home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / DOSIMP12.ARJ / SIMPLY3.HYP < prev    next >
Text File  |  1992-01-16  |  117KB  |  1,934 lines

  1.                         |tMemory|t and Related Topics
  2.  
  3. First  of all,  |nmemory|n has  nothing to do  with disk space.   Some people
  4. might call disk space "memory" but that is misleading and very confusing.
  5. The two aren't related at all.   Disk space is where  the computer stores
  6. things that it's not using at the moment.   Like a file cabinet.   |nMemory|n
  7. is |TRAM|T (Random Access Memory)  chips that plug into the motherboard,  and
  8. this is where  the computer keeps  programs that are  actually running at
  9. the moment,  and the data  those programs are using.   Like your desktop.
  10. The size of your desk and the size of your filing cabinets are not at all
  11. related.   If you get an  "Out of memory" error,  don't be thinking  that
  12. deleting files from your hard drive is going to help that.  What you need
  13. to do  is remove  some of the |sTSR|ss  and |sdevice driver|ss that you're using.
  14. The way to do that is to edit your CONFIG.SYS and AUTOEXEC.BAT files,  to
  15. remove the commands  that start those |sTSR|ss  and |sdevice driver|ss,  and then
  16. reboot the computer.  Or just reboot from a clean boo|1t disk.
  17.  
  18. Besides whatever programs you're working on,  and whatever |sdevice driver|ss
  19. and |sTSR|ss your CONFIG.SYS and AUTOEXEC.BAT files loaded for you,  the com-
  20.                        <page down> for more Memory
  21. puter's |nmemory|n also contains the main parts of DOS, at all times.   With-
  22. out DOS in |nmemory|n,  the computer is every bit as stupid  as your electric
  23. stapler.   No, in fact,  more stupid than that  because the stapler knows
  24. how to staple.   The computer doesn't know how to do anything  unless DOS
  25. is there telling it.   This part of DOS that stays in |nmemory|n all the time
  26. is called the DOS "|tkernel|t".  Now all the software companies know that the
  27. DOS |nkernel|n has to be in |nmemory|n,  and even a couple  of |sdevice driver|ss and
  28. |sTSR|ss too.  So when they write on the package that a certain program needs
  29. 512K or 640K in order to run, they mean you need to have that much |nmemory|n
  30. installed, not that you need to have that much available.  By the way, to
  31. find out how much you have available at any particular time,  look at the
  32. last line of the CHKDSK command's output, or if you have DOS version 4 or
  33. later, use the MEM command.
  34.  
  35. |nMemory|n is volatile.   That means it evaporates easily.   Ok, it's not the
  36. |nmemory|n that's volatile,  it's the stuff that's in |nmemory|n that's volatile.
  37. The second you turn off the computer,  or reboot,  or the power goes out,
  38. everything  that was in |nmemory|n is gone.   And you can't get it back.   So
  39. save your work to disk often.   For example,  as I'm writing this with my
  40.                        <page down> for more Memory
  41. word processor, the only place my words exist is in the computer's |nmemory|n
  42. so if my  electric company hiccupped,  I'd have to start this chapter all
  43. over again.  Well my word processor has this real handy F2 keystroke that
  44. means  "save to disk under original filename".   So I hit my F2 key every
  45. couple of sentences.  That writes my work to disk where it won't get lost
  46. even if my electricity goes out altogether.   Of course your word proces-
  47. sor doesn't  necessarily use the F2 key  for saving.   Find out what key-
  48. stroke works to save data to disk in your word processor, and do it often
  49. while  you're writing!   The same goes  for your  spreadsheet,  database,
  50. paint program, and whatever other programs you use.
  51.  
  52. |tBytes|t are units of measurement for |nmemory|n.   A byte is just basically one
  53. character of data.  "A" is a byte, "b" is a byte, "7" is a byte, "+" is a
  54. byte, etc.  A bit is one eighth of a byte, and a nybble is one half byte,
  55. but it's not too often  that you'll need to know those.   Mostly you only
  56. need to know multiples of |nbytes|n, not fractions of them.   A Kilobyte, Kb,
  57. or K, is 1024 |nbytes|n.  (The abbreviation Kilo usually means 1000, but com-
  58. puters use a binary numbering system  so 1024 is what Kilo means when you
  59. talk computers.)   A Megabyte,  Meg,  Mb,  or M,  is  1024 Kilobytes,  or
  60.                        <page down> for more Memory
  61. 1,048,576  bytes.   And a  Gigabyte is  1024 Megabytes,  or 1,073,741,824
  62. bytes.
  63.  
  64. There are lots  of different classifications of |nmemory|n.   The most impor-
  65. tant is the lowest 640K, which is called |tConventional|t |nmemory|n.  That's the
  66. kind that DOS knows how to run programs in,  and that's right, 640K of it
  67. is all there is!   Well the designers  of the first PC thought that was a
  68. good idea at the time.   See,  back then 64K  was a perfectly respectable
  69. amount of |nmemory|n for a computer to have.   Honest,  you could run a whole
  70. lot of programs in that little bit of |nmemory|n.   (You still could,  except
  71. that programmers are writing  these big fat programs  with fancy graphics
  72. and other  |nmemory|n-wasting features.)   All right,  so we started out with
  73. the IBM-PC which didn't physically have  the ability to address more than
  74. one meg of different |nmemory|n locations, and the designers had to set aside
  75. some portion of that |nmemory|n space  to use for the |nmemory|n  on the graphics
  76. card, and the BIOS,  and all that.   So they decided that 384K of the one
  77. meg had to be |treserved|t for those things, and the other 640K could be used
  78. as main program |nmemory|n.   And there wasn't anything wrong with that,  be-
  79. cause remember computers back then didn't need any more than one tenth of
  80.                        <page down> for more Memory
  81. that!
  82.  
  83. Well nowadays we need more than that,  but we don't get it.   Because IBM
  84. and Microsoft  are committed to  continued support  of the people who are
  85. still using those IBM-PCs, |sXT|ss, and other computers that use the 8088 CPU
  86. chip which can't address  more than one meg of |nmemory|n locations.   DOS is
  87. never  going to lose the 640K barrier  as long as there are 8088 machines
  88. still being used.
  89.  
  90. So,  what do we do about that  if we want  to keep using  DOS?   Well the
  91. first workaround was  the |tExpanded|t |nMemory|n Specification,  which is called
  92. |TEMS|T for short.   This scheme was invented  so that machines with the 8088
  93. CPU could use more than  640K of |nmemory|n.   Well remember the 8088 can not
  94. talk to more than  1,048,576 different  bytes of |nmemory|n.   But that's ok,
  95. because remember that space  between the 640K  and 1024K addresses?   You
  96. know,  the part  that's reserved  for the video card,  the BIOS,  and all
  97. that?   Not all of that gets used up  by those things for which it is re-
  98. served.   Some of it is  left empty.   So they invented  |nexpanded|n |nmemory|n.
  99. There's a piece of hardware on an |nexpanded|n |nmemory|n board that knows how to
  100.                        <page down> for more Memory
  101. dynamically remap |nmemory|n locations into different |nmemory|n addresses.  Well
  102. first it needs a certain piece of software loaded into |nmemory|n,  called an
  103. Expanded |nMemory|n Manager (EMM),  that controls a certain 64K chunk of that
  104. reserved |nmemory|n.  This 64K chunk is called a Page Frame.  Now the EMM can
  105. use that  expanded  |nmemory|n board's  address remapping  ability  to switch
  106. different chunks of expanded |nmemory|n in and out of that page frame.   See,
  107. DOS can access  any |nmemory|n address  below one meg.   DOS normally ignores
  108. everything above 640K because the rest is reserved, but the EMM tells DOS
  109. that it's ok to look for data in the page frame.   So the EMM keeps track
  110. of where the data is on the expanded |nmemory|n board,  and when DOS asks for
  111. a certain piece  of data,  the EMM remaps  that piece of |nmemory|n  into the
  112. page frame where DOS can see it, and then the next time DOS asks for some
  113. other piece of data  from the expanded |nmemory|n board,  the EMM puts what's
  114. in the page frame back onto the expanded |nmemory|n board  and gets the piece
  115. DOS wants  and puts it  in the page frame  instead.   It's just switching
  116. banks of |nmemory|n locations  into and out of  a small number of |nmemory|n add-
  117. resses  (so EMS is also called  "bank switching").   As you can  imagine,
  118. this goes a lot slower than normal conventional |nmemory|n access,  but it is
  119. better than not having any way at all to access more than 640K of |nmemory|n.
  120.                        <page down> for more Memory
  121. (|sEMS|s is also called  |TLIM|T--Lotus-Intel-Microsoft--|nmemory|n,  and if you want
  122. to buy an expanded |nmemory|n board, then make real sure  that it's complete-
  123. ly hardware-compatible with version 4  of the |nLIM|n EMS specification since
  124. a lot of programs won't be able to use it if it's not.)
  125.  
  126. But then came the 80286 processor.  This one has the ability to access 16
  127. mega|sbytes|s worth of |nmemory|n addresses.  So a new scheme had to be developed
  128. to access all those addresses!  This one was called |teXtended|t |nMemory|n Spec-
  129. ification (|TXMS|T).   (Who came up with these names,  huh?)   Now there is a
  130. problem with this.  The 286 processor can run in two modes.  One's called
  131. |tReal Mode|t and that's the only one DOS can run in.  But in |nreal mode|n there
  132. is no way to access anything  above the one meg address.   The other mode
  133. is called  |tProtected Mode|t,  and in that mode  the computer can  address a
  134. virtually unlimited  amount of |nmemory|n,  but DOS can't run when the compu-
  135. ter is in |nprotected mode|n.   So you've got to have  a thing called  an |nXMS|n
  136. manager, which is a device driver in the same way that the EMM is.   This
  137. thing controls the processor's switching back and forth between |nreal mode|n
  138. and |nprotected mode|n, so that |nextended|n |nmemory|n can be accessed.
  139.  
  140.                        <page down> for more Memory
  141. Well  you can see  that with all this  switching of |nmemory|n  locations and
  142. switching of  processor modes,  there's just about  no way that a program
  143. can run in either expanded or extended |nmemory|n.  But there are quite a few
  144. types of programs  that can store and access the data they're working on,
  145. in those types  of |nmemory|n.   But these programs  have to be specially de-
  146. signed to know  how to do that.   There's no way  to get a program to use
  147. expanded  or extended |nmemory|n  for its data storage  unless it was written
  148. specifically to be able to use it.
  149.  
  150. Besides just applications like some spreadsheets and databases, there are
  151. other things  that very commonly know how  to use that additional |nmemory|n.
  152. DOS  even comes with  a couple of them.   A RAMdisk can do it.   So can a
  153. disk cache.   DOS comes with |sRAMDRIVE.SYS|s/|sVDISK.SYS|s  and SMARTDRV.SYS for
  154. those purposes.  Print |sspooler|ss can also do it, but DOS doesn't come with
  155. one of those,  except for the PRINT command  which is a spooler  that can
  156. only use  conventional  |nmemory|n.   Most |sRAMdisk|ss,  disk caches,  and print
  157. |sspooler|ss can even use extended |nmemory|n  without your loading any XMS mana-
  158. ger!  They have their own built right in.  Isn't that convenient?
  159.  
  160.                        <page down> for more Memory
  161. DOS versions 4 and 5 also come with |tHIMEM.SYS|t, an XMS manager, and an EMM
  162. called |TEMM386|T.  As its name implies, |nEMM386|n can only run on 386 or higher
  163. computers.  You see, a 386 doesn't need an expanded |nmemory|n board in order
  164. to have expanded |nmemory|n.   The 386 processor has |nmemory|n-address-remapping
  165. capabilities built right into it.   So all it needs  is the EMM (manager)
  166. in order to treat  some of its extended |nmemory|n as expanded |nmemory|n.   This
  167. is called EMS emulation.  This is not to be confused with EMS simulation.
  168. Simulation is done on 286 machines that don't have expanded |nmemory|n boards
  169. but it doesn't work nearly as well as real expanded |nmemory|n does.  The 286
  170. just doesn't have the ability  to treat extended |nmemory|n as if it were ex-
  171. panded.  An EMS simulator will try.   It puts the page frame into conven-
  172. tional |nmemory|n instead of the reserved |nmemory|n area,  and it's slow, and it
  173. can't even be used by some of the types of software that require expanded
  174. |nmemory|n.  But if your application can use it,  and if you have the conven-
  175. tional |nmemory|n  to spare to use  for the page frame,  it's better than not
  176. having expanded |nmemory|n at all.  Pretty much.
  177.  
  178. So,  how do you remember the difference  between the words "|sexpanded|s" and
  179. "|sextended|s"?   They're identical except for the middle syllable,  but it's
  180.                        <page down> for more Memory
  181. not really  so difficult.   The word  expanded  conjures up  the image of
  182. something  that has gone  from being narrow  to being wide.   Well,  with
  183. expanded |nmemory|n,  DOS is looking  through a  narrow page frame  at a wide
  184. chunk of |nmemory|n.   The word extended refers to something going from short
  185. to long.   And with extended |nmemory|n,  you take  the short list  of |nmemory|n
  186. addresses that the computer can access,  just one meg,  and you make it a
  187. long list of addresses,  up to sixteen megs or even more.   You could say
  188. that description of extended could also apply to expanded, but it doesn't
  189. because expanded |nmemory|n doesn't have any addresses.  (Except the 64K bank
  190. of |nmemory|n that's  currently sitting in the page frame.   It has addresses
  191. for the moment, but only until DOS wants data from one of the other banks
  192. of expanded |nmemory|n  and the EMM swaps it back out  to the unaddressed ex-
  193. panded |nmemory|n to swap the requested bank into the page frame.)
  194.  
  195. There are a lot more programs written  to be able to access expanded mem-
  196. ory than there are of programs that can use extended.   Because it's been
  197. around longer, so programmers have already learned real well how to write
  198. for it.   And also because software companies  like to be compatible with
  199. as many kinds of computers as possible to sell as many copies as possible
  200.                        <page down> for more Memory
  201. so they have to use expanded  instead of extended  so that their programs
  202. will run on machines that are still using the 8088 processor.   But when-
  203. ever you have  a choice of which kind to use,  go with extended if at all
  204. possible because it's much more efficient!
  205.  
  206. One thing  that an  awful lot  of people  don't understand,  is that even
  207. though extended |nmemory|n can't exist at any address lower than 1024K,  that
  208. does not mean that a computer with  only one meg of |nmemory|n can't have any
  209. extended |nmemory|n.   It doesn't mean that at all!   Remember, the addresses
  210. between  640K  and 1024K  are reserved  for all that  BIOS and  video and
  211. stuff.   So motherboard |nmemory|n  can't go there.   If you have  one meg of
  212. |nmemory|n on your motherboard,  then the part above the first 640K has to go
  213. into addresses above 1024K since it can't go into the reserved area.   If
  214. someone is trying to sell you  a computer  that allegedly has  one meg of
  215. RAM,  and it doesn't have either Shadow RAM or else 384K of extended mem-
  216. ory, then he's trying to rip you off.   If you're getting one meg of mem-
  217. ory addresses,  then you're only getting 640K of |nmemory|n, because all com-
  218. puters have the empty 640K-1024K addresses,  even computers with only 32K
  219. of RAM.   If you're getting one meg of |nmemory|n,  then you're getting 1408K
  220.                        <page down> for more Memory
  221. of |nmemory|n addresses.   The 640K-1024K  addresses are reserved.   They are
  222. empty.   They don't have any |nmemory|n in them.   So they don't count as far
  223. as "amount of |nmemory|n on the motherboard" is concerned.
  224.  
  225. Well those are the main types of |nmemory|n but we're not done with this les-
  226. son yet.  Not at all.  For one thing, there are exceptions to some of the
  227. rules I've given so far.   It actually is possible  to get more than 640K
  228. of conventional |nmemory|n, even up to 736K.   But only on some machines, and
  229. only if you give up your graphics capability.   Remember how there is all
  230. that unused space in the reserved |nmemory|n area?   The only reason it can't
  231. be used as conventional |nmemory|n is because it is not "contiguous", or in a
  232. row, with the conventional |nmemory|n.   The lowest addresses in the reserved
  233. |nmemory|n area  are used  by the graphics parts  of the |nmemory|n on your video
  234. card.   So that is between  the conventional |nmemory|n  and the empty parts.
  235. Since the  empty parts  are separated  from  the conventional |nmemory|n,  it
  236. can't be part of conventional |nmemory|n.   But check this out!  The graphics
  237. |nmemory|n is contiguous with  the conventional |nmemory|n.   If it weren't being
  238. used for graphics, it could be used for conventional memory!  Well that's
  239. just the idea behind programs such as Quarterdeck's VIDRAM.   It disables
  240.                        <page down> for more Memory
  241. the graphics and convinces DOS  to use that portion  of the reserved mem-
  242. ory.  Absolutely amazing.   But of course you can't run any graphics pro-
  243. grams while you're using VIDRAM.   Only plain old text programs like word
  244. processors.  But just imagine being able to have over 700K of convention-
  245. al memory!   You could have lots of |sTSR|ss loaded  and still be able to run
  246. some really large programs.   Trouble with that is,  most of the programs
  247. that want large amounts of |nmemory|n  are the programs that need to use that
  248. graphics |nmemory|n for graphics.
  249.  
  250. So, besides disabling graphics to add it to the conventional |nmemory|n,  and
  251. using 64K of it for an expanded |nmemory|n page frame,  how else can you take
  252. advantage of the fact that the reserved |nmemory|n area is not all used up by
  253. the things that are supposed to use it?  Well if you have the right hard-
  254. ware and the right software,  you can run your |sTSR|ss and |sdevice driver|ss up
  255. there which frees up  all the space  they would otherwise be  using up in
  256. your precious conventional |nmemory|n.  What's the right hardware?  A 386, or
  257. a 286 with a LIM 4.0 expanded |nmemory|n board,  or a 286 with a very special
  258. chipset such as  the Chips & Technologies  NEAT chipset or just about any
  259. one that has Shadow RAM capability.   (We'll get to Shadow RAM in a bit.)
  260.                        <page down> for more Memory
  261. All of these pieces of hardware have the ability to remap |nmemory|n from one
  262. location to another.   So they can take some expanded  or extended |nmemory|n
  263. and convince the computer that it's actually located in those unused add-
  264. resses  in the reserved |nmemory|n area.   So now you have |nmemory|n that is not
  265. in conventional addresses,  but is still in addresses  that DOS knows how
  266. to communicate with.  And you can load things into those addresses.  What
  267. is the software that you need  to make DOS use  those addresses  now that
  268. you have |nmemory|n in them?   For a 286 there's Quarterdeck's QRAM, a couple
  269. of other  commercial ones,  and even  two shareware ones  that I know of,
  270. called  The Last Byte and HRAM.   For a 386  or higher computer,  there's
  271. Quarterdeck's QEMM, Qualitas's 386Max, and even DOS 5.0's EMM386.   DOS 5
  272. didn't include one for 286s  because there are so few 286s  that have the
  273. |nmemory|n-remapping ability, whereas all 386s have it.
  274.  
  275. By the way,  once there is some |nmemory|n remapped into those empty reserved
  276. |nmemory|n addresses, it's not called "|sreserved|s" anymore.   Now it's known as
  277. |tUpper|t |nMemory|n Blocks.   Some software companies  even call it high |nmemory|n,
  278. but I don't like to do that,  because it's too easy  to confuse that term
  279. with the HMA.  (|TUMB|T is the abbreviation for |nUpper|n |nMemory|n Blocks.)
  280.                        <page down> for more Memory
  281. What is this  "|TBIOS|T" thing that  part of the reserved |nmemory|n  is reserved
  282. for?  It stands for Basic Input/Output System.   This is the instructions
  283. in the |nROM|n of the computer that tell it how to communicate with the peri-
  284. pherals such as the drives, the keyboard, the comm ports, etc.  DOS talks
  285. to the |nBIOS|n real often,  because each computer is a little different from
  286. every other computer,  so DOS couldn't possibly  know how  to communicate
  287. with every type of hardware.   So the |nBIOS|n is like the translator between
  288. DOS and the hardware.   AMI and Phoenix  are both very popular  brands of
  289. |nBIOS|n, and every make and model of computer has its own version.
  290.  
  291. Well,  considering how often DOS has to access the |nBIOS|n,  and considering
  292. that it's in |TROM|T  (Read-Only  Memory)  which is non-volatile  and is very
  293. slow,  wouldn't it be nice  to have it in fast RAM  instead of slow  ROM?
  294. Well, that's what |tShadow|t RAM is all about.   Computers that can do |nShadow|n
  295. RAM remap some extended |nmemory|n  into the reserved addresses through which
  296. the computer would normally be accessing the |nROM|n,  and copy the data from
  297. the |nROM|n into that remapped RAM.   So there you go, you have your |nROM|n |nBIOS|n
  298. routines  in nice fast RAM  instead.   The problem is,  this is eating up
  299. what would otherwise  be extended |nmemory|n.   Some computers only do it for
  300.                        <page down> for more Memory
  301. the addresses that are  used by ROM chips,  but others disable  an entire
  302. 384K  of extended |nmemory|n  while they're at it.   And some computers allow
  303. Shadow RAM to be disabled,  so that your extended |nmemory|n becomes extended
  304. again, but others don't.  So if you've only got one meg of RAM, then it's
  305. possible that Shadow RAM ability  is depriving you of extended |nmemory|n al-
  306. together.   Well, nothing in life is free.   You want fast BIOS routines,
  307. but sometimes you have to give something up in order to get it.
  308.  
  309. Ok,  here comes another  exception to the rules.   I said that there's no
  310. way that DOS can access anything above the one meg address.   Well that's
  311. true,  DOS can't access  any block of |nmemory|n  whose starting  location is
  312. above the one meg address.   But that doesn't say anything about the end-
  313. ing location of a |nmemory|n block.  On a 286 or higher computer that has ex-
  314. tended |nmemory|n, there's a little trick of the A20 address line that allows
  315. DOS to access  a 64K chunk of |nmemory|n  that begins 16 bytes  below the one
  316. meg address.   So that means  that 65,520 bytes  of that |nmemory|n block  is
  317. above the one meg address, but DOS can access it because DOS names |nmemory|n
  318. blocks by their starting address, not their ending address.   This little
  319. 64K chunk of space is called  the |tHig|1h|t |nMemory|n Area,  which is abbreviated
  320.                        <page down> for more Memory
  321. as |tHMA|t.   It's not conventional |nmemory|n,  because it's not contiguous with
  322. the bottom 640K of |nmemory|n.   But some programs know  how to use it almost
  323. as if it were conventional memory!   This is one of the best things about
  324. DOS version 5.   It actually knows how to run  while part of it is in the
  325. HMA!  You have to load the HIMEM.SYS device driver which is an XMS manag-
  326. er and |nHMA|n manager, and then give the command |sDO|1S|s=|sHIG|1H|s in your CONFIG.SYS
  327. file, and magically the DOS kernel and the BUFFERS will load into the |nHMA|n
  328. instead of  into conventional memory!   This frees up  about 45K  of your
  329. precious conventional |nmemory|n,  or even 64K of it  if you were using a lot
  330. of buffers.   Also the latest version of  Microsoft's mouse driver can go
  331. into the |nHMA|n.  But when one program is using the |nHMA|n nothing else can use
  332. it.   Even if there is room left up there.    Nothing can go there except
  333. things that the  controlling program  allows.   The DOS kernel allows the
  334. buffers and the mouse driver,  but nothing else.   Any leftover |nHMA|n space
  335. just goes to waste.
  336.  
  337.  
  338.  
  339.  
  340.                <page down> for DOS 5.0's |nMemory|n Management
  341.                        DOS 5.0's Memory Management
  342.  
  343. If you don't have  a 286 or  higher computer  with some  extended memory,
  344. then don't even read this chapter.   It will only make you jealous of the
  345. people who do have the right hardware to be able to do this stuff.
  346.  
  347. The first thing you want to do,  is load the  HIMEM.SYS device driver via
  348. your CONFIG.SYS file,  by putting the line |sDEVIC|1E|s=C:\DOS\HIMEM.SYS at the
  349. beginning of that file.  HIMEM.SYS is an XMS manager and HMA (|sHig|1h|s Memory
  350. Area) enabler.  It gives you access to both of those types of memory.
  351.  
  352. Then add the line  |TDO|1S|T=|sHIG|1H|s anywhere in the CONFIG.SYS file,  and DOS 5.0
  353. will load its kernel and the BUFFERS into the HMA instead of leaving them
  354. to take up your precious conventional memory space.
  355.  
  356. Since the HIMEM.SYS device driver converts all of your extended memory to
  357. XMS memory  (which just means extended memory  that's being managed by an
  358. eXtended Memory Specification driver which is what HIMEM.SYS is),  if you
  359. have  any programs  that can use  extended memory  but can't use  the XMS
  360.                        <page down> for more DO|1S 5.0
  361. method of accessing it, then you need to tell HIMEM.SYS to leave you some
  362. plain old  extended memory  instead of managing all of it  and turning it
  363. into XMS memory.   That's easy to do.   Just add the parameter /INT15=###
  364. to the end of your  |sDEVIC|1E|s=|sHIMEM.SYS|s command.   The symbol ### stands for
  365. however many Kilo|sbytes|s  of extended memory  you want to keep  as extended
  366. instead of having it converted to XMS, plus 64K.  For example if you want
  367. to keep 256K  of extended memory,  then you would use  /INT15=320 because
  368. 256 + 64 = 320,  so that will leave you with 256K of extended memory, and
  369. the rest will still be converted to XMS memory and HMA and all that.
  370.  
  371. If you have a 286,  that's it,  you're done.   If you have a 386, there's
  372. lots more, so read on!
  373.  
  374. First,  change DOS=|sHIG|1H|s to  DOS=|sHIG|1H|s,UMB which tells DOS to use the Upper
  375. Memory Blocks that EMM386 is going to create.   And right after the HIMEM
  376. .SYS line, you want to install EMM386.  If you just want EMM386 to create
  377. some upper memory blocks  in the empty reserved memory addresses  between
  378. 640K and 1024K, then use this line:
  379.           |sDEVIC|1E|s=C:\DOS\EMM386.EXE NOEMS
  380.                        <page down> for more DO|1S 5.0
  381. The NOEMS parameter tells EMM386 NOt to create any EMS (|sexpanded|s) memory.
  382. So it will just remap some extended memory into those empty reserved add-
  383. resses, so that it becomes upper memory.
  384.  
  385. If you want EMM386 to create upper memory  and also emulate some expanded
  386. memory, then you use this line instead:
  387.           |sDEVIC|1E|s=C:\DOS\EMM386.EXE #### |nRAM|n
  388. The |nRAM|n parameter  tells EMM386 to create  upper memory  and also emulate
  389. some expanded memory.  That means, take some extended memory and convince
  390. the computer  that it's really expanded memory instead.   The #### symbol
  391. there is the spot where you tell it how much EMS to create.   The default
  392. is 256 so if you want  just 256K of  expanded memory,  then you can leave
  393. that out.   If you want, say,  a meg of EMS,  then put 1024 there where I
  394. put ####.   Now understand  that emulating EMS  is going to eat up 64K of
  395. that upper memory that EMM386 has created for you.   Because that's where
  396. the expanded |smemory|s's  page frame has to go.   That gives you 64K less of
  397. upper memory that you can use,  so don't use the |nRAM|n parameter unless you
  398. have an application that really does want some expanded memory.
  399.  
  400.                        <page down> for more DO|1S 5.0
  401. (If for  some reason  you want to have  emulated expanded memory  without
  402. creating any upper memory,  then load EMM386 without  either of the NOEMS
  403. or |nRAM|n parameters.   And if for some reason you want to have upper memory
  404. support without loading the DOS kernel hig|1h,  then use DOS=|sUMB|s instead of
  405. DOS=|sHIG|1H|s,UMB.)
  406.  
  407. All right,  now you've got upper memory in what used to be empty reserved
  408. memory addresses.   And you've used DOS=|sUMB|s to tell DOS to be prepared to
  409. use that  upper memory.   So what do you do with it?   You load your |sTSR|ss
  410. and |sdevice driver|ss into it!   So that they no longer take up any space in
  411. your conventional |smemory|s!  For your |sdevice driver|ss, you just use the com-
  412. mand |tDEVICEHIGH|t instead of the DEVIC|1E command you would normally use, and
  413. make sure it comes after the commands  that load HIMEM and EMM386 or else
  414. it won't work because there is not yet any upper memory to |nDEVICEHIGH|n in-
  415. to.  For your |sTSR|ss, you insert the word |tLOADHIGH|t (or the abbreviation |tLH|t)
  416. at the front of the command that loads the TSR into memory.  For example,
  417. if you usually load a screen saver  with the command EXPLOSIV M2 then you
  418. would change that to |nLOADHIGH|n EXPLOSIV M2 or |nLH|n EXPLOSIV M2 so the screen
  419. saver will go into upper memory instead of conventional.
  420.                        <page down> for more DO|1S 5.0
  421. If you run out of upper memory  so that DOS can't load  the specified de-
  422. vice or TSR there,  it will still load it,  but into conventional memory,
  423. just as if you had used the DEVIC|1E command or left out the LH instead.
  424.  
  425. Now there are |sTSR|ss and |sdevice driver|ss that just won't run from upper mem-
  426. ory at all.   No matter what.   And there are others that would run there
  427. if only you could  get them up there.   Some of them  give a MEM  command
  428. reading like as if they were small enough to fit into a free UMB, and yet
  429. they will load into conventional RAM instead of loading high, as if there
  430. was not enough memory free in the UMB.  A lot of times, all this means is
  431. that there's not enough memory up there for it to load,  not that there's
  432. not enough for it to run.  What?  Well you see, many drivers and |sTSR|ss re-
  433. quire a whole bunch of memory while they're loading,  but then as soon as
  434. they're loaded,  they settle down and only take up their normal amount of
  435. memory.   If you've got one of these,  all you have to do is put its com-
  436. mand earlier in the CONFIG.SYS or AUTOEXEC.BAT file, so that it loads be-
  437. fore something else,  so that at that time,  there is a larger  UMB open.
  438. Then it can load,  and it will settle down  to its normal small size,  so
  439. that there will  still be room  for the one that you put  the misbehaving
  440.                        <page down> for more DO|1S 5.0
  441. one in front of.   So with DEVICEHIGH and LOADHIGH, loading order of |sTSR|ss
  442. and |sdevice driver|ss matters even more than it used to before DOS 5.0.
  443.  
  444. The EMM386 |sdevice driver|s/command has a lot of switches and parameters but
  445. you'll probably never need any of them, except the i switch.   The "i" is
  446. for "include" and it lets you include extra upper memory addresses.   You
  447. see, DOS only remaps extended memory to certain upper memory addresses it
  448. knows  are available on  just about every type  of computer.   Almost any
  449. computer has more available upper memory addresses than those,  it's just
  450. that DOS has no way of knowing which ones are available,  unless you tell
  451. it.   So if you can decipher the output of the MEM /D command,  or if you
  452. have a program  such as Quarterdeck's  Manifest  that can tell you  which
  453. addresses are not being used, you can use |sEMM386|s's i switch to tell it to
  454. create usable  upper memory blocks in those addresses too!   Then you can
  455. LOADHIGH a whole bunch more |sTSR|ss and |sdevice driver|ss!  For example, here's
  456. the command I use in my CONFIG.SYS file:
  457.           |sDEVIC|1E|s=C:\DOS\EMM386.EXE i=b000-b7ff i=c800-efff NOEMS
  458. Because Manifest tells me that the addresses  B000-B7FF and C800-EFFF are
  459. unused on my computer.  These addresses work for a lot of people.  But if
  460.                        <page down> for more DO|1S 5.0
  461. you want to try those, you make real sure to have a good |sboot|sable DOS 5.0
  462. floppy disk handy before you add those i switches to your EMM386 command!
  463. Because if those memory addresses are not available on your computer then
  464. putting those switches in there could very well lock up your computer and
  465. you won't be able to reboot either,  because every time you try, the com-
  466. puter will read  the same line in the same CONFIG.SYS file  and just lock
  467. up again!  You'll need to be able to boot from a floppy disk and edit the
  468. CONFIG.SYS file to remove those i switches again.
  469.  
  470. Now there's  one problem  with having all that  free  conventional memory
  471. that  DOS 5.0 can give you  when you load everything high.   In the past,
  472. the  lowest 64K  of conventional memory  was always taken  up by  the DOS
  473. kernel and stuff,  so programs never needed to know  how to run in such a
  474. low address.  A lot of programs can't, but it never mattered before.   It
  475. does now,  though.   Because with the DOS kernel and all your device dri-
  476. vers and |sTSR|ss loaded high,  a lot of that lowest 64K of addresses is free
  477. for program use,  and many programs just have a fit  when they try to run
  478. there.   Common responses to this  are the  "|tPacked file corrupt|t" or "CRC
  479. error"  messages,  or just not running at all.   What should you do about
  480.                        <page down> for more DO|1S 5.0
  481. it?  Either load a couple of |sTSR|ss low to fill up those lowest 64K of add-
  482. resses,  or reboot the computer from a floppy disk that doesn't have DOS=
  483. |sHIG|1H|s in its CONFIG.SYS file, or use the new command that comes with DOS 5
  484. for just this purpose, whose name is |tLOADFIX|t.
  485.  
  486. Say you have a program named  HELLO.EXE that gives you that  "Packed file
  487. corrupt" message when you try to run it.   Well all you have to do is in-
  488. stead of typing  HELLO to run that program,  just type  |nLOADFIX|n HELLO and
  489. |nLOADFIX|n will load the  HELLO.EXE program into addresses  above the bottom
  490. 64K, and run it there.  Then it'll work just fine.
  491.  
  492. Now if you have a 386 computer,  with DOS 5.0,  you should be able to get
  493. about 616K  of free conventional memory.   The only things that should be
  494. loaded low are parts of MSDOS, HIMEM, EMM386, and COMMAN|1D.  Hopefully you
  495. will be able to get everything else into the upper memory blocks.
  496.  
  497. If you have a TSR that allows you  to use commands to modify its behavior
  498. after it's loaded, and you used LOADHIGH to load it,  you may have to use
  499. LOADHIGH to get the modifying-commands to work also!  For example, I have
  500.                        <page down> for more DO|1S 5.0
  501. a screen saver named EXPLOSIV and it allows commands such as EXPLOSIV OFF
  502. to temporarily disable it, EXPLOSIV ON to re-enable it, etc.  Well when I
  503. have it |sLOADHIGH|sed,  those commands don't work.   Because, when I use the
  504. OFF parameter to try to disable it, EXPLOSIV loads into conventional mem-
  505. ory and looks around  to find the copy of it that's already loaded to try
  506. to disable itself, and it finds that it's not already loaded,  so how can
  507. it disable itself?  It is already loaded, but it can't tell that, because
  508. it is only looking for itself in conventional, not upper, memory.  So the
  509. command LOADHIGH EXPLOSIV OFF works,  because with that command, EXPLOSIV
  510. loads into upper memory to look for the already-loaded copy of itself and
  511. turn it off.   It works just fine that way.   It seems strange to use the
  512. LOADHIGH command to disable a TSR,  but in some cases  that's what has to
  513. be done.  So if you have a TSR that lets you disable it, or unload it, or
  514. modify it in some way,  and it doesn't work  when the TSR is  |sLOADHIGH|sed,
  515. try using the LOADHIGH command like that, and it just might work for you.
  516.  
  517. Be sure to use the versions of HIMEM.SYS  and SMARTDRV.SYS that came with
  518. DOS 5 rather than the old outdated ones that came with Windows 3.0 if you
  519. use Windows!
  520.                       <page down> for What Is a TSR?
  521.                               What Is a |tTSR|t?
  522.  
  523. |nTSR|n stands for Terminate-and-Stay-Resident.  Another name for |nTSR|n is Mem-
  524. ory-Resident-Program.   That means any program  that you load into memory
  525. once, and it stays there,  at your beck and call,  or just hanging around
  526. in the background  watching every move  you make,  until such time as you
  527. reboot the computer.
  528.  
  529. DOS itself can be thought of as a |nTSR|n,  except that TSRs  are usually op-
  530. tional,  and DOS is not.   If you don't have DOS  resident in memory then
  531. your computer  ain't going  nowhere!   |sDevice driver|ss  are also TSRs in a
  532. way, but just a special type of |nTSR|n.
  533.  
  534. If you have a mouse or trackball,  and you load its driver  via AUTOEXEC-
  535. .BAT rather than CONFIG.SYS,  then it is not  a device driver exactly but
  536. it still is a |nTSR|n,  most definitely.   It hangs around  in the background
  537. watching you, and whenever you move your mouse it springs into action and
  538. moves the mouse pointer around on your screen.
  539.  
  540.                          <page down> for more TSR
  541. Automatic screen savers  that blank your screen after a certain number of
  542. minutes of keyboard inactivity are TSRs.   Anything you can "hotkey" into
  543. with a little keystroke combination like <Ctrl-Esc> or <Alt-F1> is also a
  544. |nTSR|n.  There are lots of little phone book and appointment scheduler TSRs.
  545.  
  546. And here are some of the TSRs that come free with DOS:   APPEND,  DOSKEY,
  547. DOSSHELL, FASTOPEN, GRAPHICS, MIRROR, MODE, PRINT, and SHARE.  Except for
  548. DOSSHELL  and MIRROR,  once you execute those commands,  the |nTSR|n stays in
  549. memory until you reboot.   Some TSRs have commands  that remove them from
  550. memory, but not most of the ones that come with DOS!  Although there is a
  551. great public domain utility called Mark-and-Release (and some others that
  552. work in the same manner)  that you can use to make it possible  to remove
  553. just about any |nTSR|n from memory without |sreboot|sing.
  554.  
  555. Of course it's not possible to remove one |nTSR|n if there has been any other
  556. |nTSR|n loaded into memory after it.  The only thing you can remove from mem-
  557. ory is the most recent thing you put into memory.  Strangely enough, this
  558. includes batch files.   If you issue a command  to remove a |nTSR|n from mem-
  559. ory from within a batch file, that |nTSR|n won't drop out of memory until the
  560.                          <page down> for more TSR
  561. batch file ends.  Because although a batch file isn't actually loaded in-
  562. to memory  while it is executed,  there is some |sbatch|s-file-handling data,
  563. that does take up a speck of memory while the batch file is running.   So
  564. the batch file  that gives the command  to unload the |nTSR|n might cause the
  565. |nTSR|n to be disabled and not work anymore,  but the memory that the |nTSR|n was
  566. using won't be freed up for other uses until that batch file exits to the
  567. DOS prompt.
  568.  
  569. You mustn't ever try to load or unload a |nTSR|n from within another program,
  570. such as when you're shelling out  from your word processor  or something.
  571. You have to exit  to the primary command processor  before you can do any
  572. messing around with  memory allocations,  or you'll probably  lock up the
  573. whole computer and be forced to reboot,  losing whatever data you had en-
  574. tered into your application since the last time you saved it to disk.
  575.  
  576. TSRs eat memory.   They eat it for breakfast, lunch, and dinner.   If you
  577. have any "Out of |smemory|s" errors,  the first thing  you want to do is make
  578. sure you're not using  any TSRs or |sdevice driver|ss in  your CONFIG.SYS and
  579. AUTOEXEC.BAT files, except necessary ones.  (See also LOADHIGH.)  The DOS
  580.                          <page down> for more TSR
  581. version 4  installation program  puts a whole bunch  of worthless  things
  582. like APPEND, FASTOPEN, GRAPHICS, and PRINT into those files.   Get rid of
  583. them,  unless you have read  what they're about  and still think you need
  584. them.   (In fact,  if you have DOS 4,  check out  every command  in those
  585. files because  there are other  useless ones  like |sLASTDRIVE|s=E and VERIFY
  586. OFF  which are |sdefault|ss,  and  |sBREAK|s=ON  which slows  your computer down.
  587. These don't take up any memory, but they're still worthless and should be
  588. removed.   I can't imagine  who wrote that ridiculous  DOS 4 installation
  589. program, but it sure wasn't anyone who knew anything about DOS commands.)
  590.  
  591. If you have DOS version 4 or later,  you can use the MEM command  to find
  592. out  what TSRs you  have loaded.   Otherwise,  look and see what kinds of
  593. commands  you have in  your CONFIG.SYS  and AUTOEXEC.BAT files.   The DOS
  594. commands you can look up right here to see if they're TSRs,  and the non-
  595. DOS commands you will have to check the documentation that came with each
  596. program.   Now you know what TSRs get loaded from your AUTOEXEC.BAT file,
  597. and then there could also be  others that you've loaded  since your AUTO-
  598. EXEC.BAT file  was run at |sboot|sup.   For example,  let's say you don't use
  599. the PRINT command  in your  AUTOEXEC.BAT file  because you don't  need it
  600.                          <page down> for more TSR
  601. that often.   But the PRINT command  is still a |nTSR|n every time you do use
  602. it,  regardless of whether your AUTOEXEC.BAT or your fingers typed in the
  603. command.
  604.  
  605. Another thing that a lot of new computer users don't realize, is that the
  606. DOSSHELL  and most other menu programs  are TSRs.   There are  some menus
  607. that drop most of the way out of memory when you launch a program through
  608. them, but most of them, including the DOSSHELL,  stay right there in your
  609. memory,  in the way of your  programs that you're  trying to run.   Isn't
  610. that dumb?  You have to exit out of the DOSSHELL or menu program in order
  611. to have enough memory  to run a program,  so what good does it do to have
  612. the menu, right?  Just to remind you of what programs you could run?  You
  613. can get that from the DIR command!
  614.  
  615. Even worse than that,  many menu programs allow shelling out to DOS,  but
  616. they don't tell you that you're supposed to type EXIT to get back in,  so
  617. instead,  you type the command that starts the menu.   Know what you just
  618. did?   You just loaded  a second copy  of the menu program  on top of the
  619. first copy that was already there!  Now you're really wasting |smemory|s!  Be
  620.                          <page down> for more TSR
  621. careful with menu programs.  They can really cause all sorts of problems.
  622. But if you know what shelling out is about, you can avoid those problems.
  623.  
  624. There are lots  of occasions  when you need to  absolutely  and without a
  625. doubt boot up without any TSRs whatsoever.   For example, when you're in-
  626. stalling a new software package  you just bought,  or every time  you are
  627. about to run a disk optimizer  to take care of all your fragmented files.
  628. The easiest way to do that,  is to reboot  from a boo|1t disk that was for-
  629. matted with the /S switch, and that doesn't have any AUTOEXEC.BAT or |nCON|n-
  630. FIG.SYS files on it.  You can put those files on your boo|1t disk, but only
  631. if the CONFIG.SYS file  doesn't contain anything  except your hard disk's
  632. device driver  if your hard disk needs one,  and only if the AUTOEXEC.BAT
  633. file doesn't contain anything but PATH and PROMPT and C|1:.  Now you have a
  634. boo|1t disk  that is safe to use  whenever you're going to  defragment your
  635. hard drive or install some new software.  This is necessary because real-
  636. ly bad things can happen if you have any TSRs in memory while you perform
  637. such operations.  Especially the disk optimizer.   It's going to move all
  638. your files  to different parts of the disk.   Well if there's anything in
  639. memory like a disk cache,  or FASTOPEN,  or anything that  keeps track of
  640.                          <page down> for more TSR
  641. where the data is at on the disk,  well,  when the optimizer moves every-
  642. thing around,  then those TSRs are going to have the wrong info, and they
  643. are going to trash your entire FAT.  Or if you have any |nTSR|n that gets ac-
  644. tivated at a certain time, or after a certain delay, and it comes to life
  645. just as the optimizer is writing to the FAT, whoa, look out!  And then to
  646. really be on the safe side, reboot the computer again the very second the
  647. optimizer finishes!  That will remove everything from memory  and let the
  648. TSRs read  the changed information  from the disk again,  in case you had
  649. forgotten to remove any of them.
  650.  
  651. TSRs work by trapping a certain interrupt.   For example, a pop-up sched-
  652. uler might sit there waiting for you to press the <Alt-S> keystroke.  Now
  653. if you have another |nTSR|n that grabs the interrupt for that keystroke also,
  654. or if the application you're working on uses that keystroke,  then you've
  655. got a |nTSR|n conflict.   There are a whole lot of ways that one |nTSR|n can con-
  656. flict with another, or with a program.  So whenever you start using a |nTSR|n
  657. that you've never used before,  watch out for problems, and if any occur,
  658. it's probably the fault of your new |nTSR|n.   There ain't no such thing as a
  659. free lunch,  ya know,  so along with the convenience of pop-up schedulers
  660.                          <page down> for more TSR
  661. and other highly  useful TSRs,  you've got to  expect some  problems too.
  662. Most TSRs work just fine  all by themselves,  but when you go using  more
  663. than one at a time,  there could be trouble.   I've been lucky,  and only
  664. had problems with two or three TSRs in my life,  but I know people who've
  665. had major problems  with lots of them.   It just depends  on what sort of
  666. system you have,  what other TSRs you use, and what applications you run.
  667. It also depends a lot on what order you have the different TSRs installed
  668. in your AUTOEXEC.BAT file.   If |nTSR|n-A doesn't work right when it's loaded
  669. before |nTSR|n-B,  then switch those AUTOEXEC.BAT lines around  to load |nTSR|n-A
  670. after |nTSR|n-B instead, and it might work just fine, believe it or not!
  671.  
  672. Many TSRs (and a lot of games too)  take over the system clock (|sCLOCK$|s) a
  673. bit more selfishly than they ought to, and end up ruining the time and/or
  674. date that DOS thinks it is.   If you find that  you have  such a program,
  675. you want to remember  to reset the TIME  every now and then,  so that the
  676. time  in your directory listings  stays close to correct.   You can use a
  677. batch file to help you remember to do that.
  678.  
  679. This looks like  a good time  to tell you  the safe way  to install a new
  680.                          <page down> for more TSR
  681. program, whether it be a |nTSR|n or not.   First, never install more than one
  682. new program in a day.  Because if you do, and problems occur, you have no
  683. idea which program  went wrong.   Install one,  test it for a day  or so,
  684. then install the next one.  And never install a program without a BACKUP.
  685.  
  686. Before you  install anything,  reboot the computer  with no TSRs  loaded.
  687. Using an |nINSTALL|n command  with TSRs in memory  can make the  installation
  688. program screw everything up.  Read the program's documentation, especial-
  689. ly the installation and troubleshooting chapters, and any README.TXT type
  690. files that came with the program.  README.TXT files are generally full of
  691. information  that the publishers  didn't remember  until after the manual
  692. was printed, so you don't want to miss it!  Now run the program's |nINSTALL|n
  693. command and try out the new program.   If it works ok, reboot your compu-
  694. ter with your normal CONFIG.SYS and AUTOEXEC.BAT files,  and test it some
  695. more.   If there are any problems,  then "|sREM|s out" the |sdevice driver|ss and
  696. TSRs from those startup files,  and try again.   Remove the REM  from one
  697. line at a time, reboot,  test the program again,  remove the REM from an-
  698. other line, reboot, test, etc., until you discover which device driver or
  699. |nTSR|n is conflicting with your new program.   Try changing the order of the
  700.                          <page down> for more TSR
  701. command  that loads that driver or |nTSR|n,  try it again, etc.   If your new
  702. program just absolutely  will not run with  that |nTSR|n or driver,  then you
  703. have to make up your mind which one you'd rather give up.
  704.  
  705. Now besides  installing new software,  and using a disk optimizer,  other
  706. times when it's very important to remove all your TSRs and |sdevice driver|ss
  707. from memory,  are when you're about to use any BACKUP or RESTORE program,
  708. or any sort of disk structure repair program like PC Tools's DISKFIX com-
  709. mand or CHKDSK with the /F switch.
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.                      <page down> for The |nMEM|n Command
  721.                              The |TMEM|T Command
  722.  
  723. Don't you hate the way you have to use the CHKDSK command and wait for it
  724. to finish looking at your disk, in order to find out how much free memory
  725. you have at the moment?  Well if you have DOS version 4 or later, there's
  726. no need to use CHKDSK for that purpose anymore!  That's what the |nMEM|n com-
  727. mand is for.
  728.  
  729. Not only does it tell you how much memory is currently free,  it can also
  730. tell you a whole bunch of other information if you ask it to real nicely.
  731.  
  732. You can use |nMEM|n all by itself or with the /P, /D, or /C switches, and |nMEM|n
  733. will tell you a different amount of information depending on which switch
  734. you use.   The /C switch is the one you want to use if you have DOS 5 and
  735. you want to see what's going on in the upper memory blocks.
  736.  
  737. If the |nMEM|n command  doesn't report  anything about EMS memory,  then that
  738. means that  either you don't have any expanded memory,  or else that your
  739. expanded memory is not LIM 4.0 compatible.   |nMEM|n won't say anything about
  740.                          <page down> for more MEM
  741. extended memory either, if you don't have any of that.
  742.  
  743. |nMEM|n is one command that you don't want to execute while shelling out from
  744. the DOSSHELL.   It doesn't give you the correct results.   For one thing,
  745. you have the DOSSHELL  and a secondary COMMAND.COM shell in memory.   For
  746. another thing,  the |nMEM|n command is going to tell you  that you don't have
  747. any available XMS memory even when you do,  if you're inside the DOSSHELL
  748. at the time.
  749.  
  750. If you have DOS 4 the /C switch doesn't exist, and the /P and /D switches
  751. can't be abbreviated.  Their real names are /PROGRAM and /DEBUG.
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.                       <page down> for What Is CMOS?
  761.                               What Is |TCMOS|T?
  762.  
  763. If you have a 286 or newer computer, you probably have |nCMOS|n.  What is it?
  764. Complementary  Metal  Oxide  Semiconductor.  Now please don't ask me what
  765. that is supposed to mean,  I just thought you'd like to know what the in-
  766. itials stand for.
  767.  
  768. What does it do?  Well it's a little piece of memory that is backed up by
  769. a battery, that keeps track of the date and time, as well as what sort of
  770. hardware you have installed in your system.   The amount of RAM, the num-
  771. ber and types  of floppy drives,  the number of hard drives  and detailed
  772. information about each,  the type of graphics adapter, the number of ser-
  773. ial and parallel ports, all this information is stored in |nCMOS|n.   If your
  774. |nCMOS|n gets wiped out,  your computer won't even know  that you have a hard
  775. drive, but you might be able to boot from a floppy disk.
  776.  
  777. So may I suggest  that you quickly get into  your CMOS's |tsetup|t  and write
  778. down every detail of what it says, because some day your battery is going
  779. to run down  and the |nCMOS|n information  will all be lost,  so you'd better
  780.                         <page down> for more CMOS
  781. know what information is supposed to be there so you can put it back!
  782.  
  783. The way to get into the |nCMOS|n is a little different for each type of BIOS,
  784. but for mine,  a little message comes up on the screen  every time I turn
  785. on the power, which says something like, "Press |nDEL|n to enter |nCMOS|n |ssetup|s".
  786. If I press the <Delete> key while that message is on the screen, then af-
  787. ter a couple seconds I get the |nCMOS|n setup screen.   I'm sure that if your
  788. screen doesn't give you any such message,  then the manual that came with
  789. your computer will tell you what to do to get to your |nCMOS|n setup.
  790.  
  791. Just write down  whatever it says there,  be sure not to change anything,
  792. and then exit.   Keep that information that you wrote down in a very safe
  793. place, and whenever your battery dies,  just get a new one, and you'll be
  794. able to put the correct information back into the |nCMOS|n.
  795.  
  796. You also have to get into the |nCMOS|n  each time you install a floppy drive,
  797. or more memory, so that you can tell your computer that its configuration
  798. has changed.
  799.  
  800.                      <page down> for What Is the CPU?
  801.                              What Is the |TCPU|T?
  802.  
  803. The |nCPU|n is the computer's brain.   It stands for Central Processing Unit.
  804. It is just a little square chip about an inch and a half on each side, if
  805. you can  believe that,  and that's where  all the computing  takes place.
  806. The one for the first set  of personal computers was the |T8088|T,  which was
  807. put into an IBM computer model which was named the PC,  and also the next
  808. model, which was called the |TXT|T.   There is also an 8086 processor,  which
  809. is very much like the |n8088|n but more expensive, so it was not widely used.
  810. Neither of those can in any way access  memory above the one meg address,
  811. but it can use expanded memory.   After that came the 80286 |nCPU|n, which is
  812. usually abbreviated as |T286|T.   This was the first computer that could take
  813. advantage of extended RAM.   It went into a model of computer  called the
  814. |TAT|T.   After that, the |T386|T and 486, now even 586, came along.   Who knows,
  815. by the time you read this,  there could be an 80686 processor being made!
  816.  
  817. When someone talks about  an |n8088|n, he could be just  making a generaliza-
  818. tion, and he's really  talking about an |n8088|n or 8086.   Also, when a body
  819. talks about an |nAT|n, he could be talking about a |n386|n as well as a |n286|n.
  820.                          <page down> for more CPU
  821. Now when it comes to the 386 |nCPU|n,  you'll often hear talk of an  SX and a
  822. DX.   Well a 386DX is just a normal 386.   It processes data 32 bits at a
  823. time, and it talks to other parts of the computer 32 bits at a time also.
  824. A 386SX is just like a 386DX,  but it can only talk to other parts of the
  825. computer 16 bits at a time.   Because the SX's  bus is only 16 bits wide.
  826. The bus is  the data |npath|n  from the |nCPU|n  to other parts  of the computer.
  827. The effect that the 16-bit bus of the SX has,  is that it's just a little
  828. bit slower than the DX,  and that it doesn't have enough address lines to
  829. be able to talk to as many memory locations.  So an SX can only deal with
  830. 16 mega|sbytes|s of memory, just like the 286.
  831.  
  832. A 486 can do everything a 386 can do, only lots faster.   It has a built-
  833. in math coprocessor (unless it's a 486SX) and a built-in memory cache.
  834.  
  835. How about a little chart?
  836.  
  837.  
  838.  
  839.  
  840.                          <page down> for more CPU
  841.          |nCPU|n          Processor        Bus         Maximum |nMemory|n
  842.  
  843.          |n8088|n          16-bit          8-bit         1 Megabyte
  844.          8086          16-bit         16-bit         1 Megabyte
  845.         80286          16-bit         16-bit        16 Megabytes
  846.         80386SX        32-bit         16-bit        16 Megabytes
  847.         80386          32-bit         32-bit         4 Gigabytes
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.                      <page down> for What Is a Cache?
  861.                              What Is a |tCache|t?
  862.  
  863. There are three different kinds of |ncache|n.   The most common one is a hard
  864. drive |ncache|n,  and that is a piece of software which,  when you install it
  865. into memory,  sets aside a large chunk  of extended or expanded memory to
  866. do the caching.   Now what it does,  is every time you read something off
  867. the hard drive,  it keeps it in  this chunk of memory,  and then when you
  868. need that piece of info again,  you get it from the |ncache|n which, since it
  869. is in RAM,  is a lot faster than going back to the hard drive to get that
  870. piece of data again.   The |ncache|n that comes  with recent  versions of DOS
  871. is called SMARTDRV.SYS.  And it's pronounced "CASH", not "cash-AY".
  872.  
  873. Most caches also do what's called look-ahead, which means that every time
  874. you get some data  from the hard drive,  it also gets the next one or two
  875. |ssector|ss of data, and puts that in the |ncache|n also.  So if you're running a
  876. type of program that does a lot of sequential disk access,  then the next
  877. time the program needs more data,  it's probably already in the |ncache|n be-
  878. cause the next  data it needs  is what came right after  the last data it
  879. needed, which the |ncache|n already looked ahead to get.
  880.                         <page down> for more Cache
  881. Even though BUFFERS do the same thing a |ncache|n does, only not as well, you
  882. do need to have some buffers even if you have a |ncache|n because most caches
  883. don't pay any attention to floppy drives.  They only work on hard drives.
  884. Well the buffers  will do a little bit  of caching  with the floppy drive
  885. info.   And one more reason for buffers even with a |ncache|n,  is that some-
  886. times you need  to disable the |ncache|n,  like when you're about to optimize
  887. your hard drive  (that means fix the fragmented files).   If the |ncache|n is
  888. disabled for a while,  you'll be glad that you have a few buffers loaded.
  889. But I do mean just a few,  because with a |ncache|n, the memory that having a
  890. lot of buffers  takes up,  is not worth it.   Unless  you've never  had a
  891. shortage  of conventional memory  in the first place,  or if you have DOS
  892. version 5,  where buffers go into the hig|1h memory area  and don't take up
  893. any conventional RAM anyway.
  894.  
  895. Now one thing  you need to remember.   You'd think  that if a large |ncache|n
  896. is good, then a huge |ncache|n would be even better, right?  Wrong.   A |ncache|n
  897. that's too large  slows things down instead of speeding them up,  because
  898. looking through all that data  that's stored in the |ncache|n can take longer
  899. than it would have taken  to just get the data  from the hard drive!   So
  900.                         <page down> for more Cache
  901. pay attention to the manual for your |ncache|n program, and if it says a cer-
  902. tain size  is recommended,  then use that size  until you know more about
  903. the subject  and have some spare time  to go testing things with a bench-
  904. mark program to find out the optimal |ncache|n size for your system.
  905.  
  906. There is one thing to watch out for with a disk |ncache|n, though.   Remember
  907. that the information  in the |ncache|n is just a copy  of what's on the disk.
  908. Just because the CHKDSK command tells you that your hard drive is trashed
  909. does not necessarily mean that it's true!   Suppose you're playing around
  910. with trying to load  a new TSR  into upper memory.   Something goes wrong
  911. and the |ncache|n in the extended memory gets trashed, and then for some rea-
  912. son you use the CHKDSK command  and it says your hard drive  has no files
  913. on it, only a million lost chains in a zillion lost |scluster|ss.  Well don't
  914. panic!   It's quite likely that when  CHKDSK went to check your directory
  915. structure for you,  it found the information that it thought it was look-
  916. ing for, in the |ncache|n so it didn't even look at the hard drive.  The copy
  917. of the directory structure that was sitting in the |ncache|n has been corrup-
  918. ted so CHKDSK  just thinks your disk  is trashed,  but there's really not
  919. a thing wrong with your hard drive at all.
  920.                         <page down> for more Cache
  921. So remember,  if CHKDSK  ever tells you  that your whole disk  is trashed
  922. while you have a disk |ncache|n active,  flush or disable the |ncache|n  and then
  923. try again  to read your hard drive.   I'll bet you'll find that it's just
  924. fine.   Just get rid of whatever it was that you were trying to load into
  925. your extended or upper memory that trashed your |ncache|n information.
  926.  
  927. The second type of |ncache|n is  a hardware drive |ncache|n that's located on the
  928. hard drive controller.   It does the same thing as the software one, only
  929. it doesn't take up any of your conventional, extended,  or any other type
  930. of memory.   The memory that it uses is built right in to the controller.
  931. It's usually  pretty small though,  so you  probably want to  use a small
  932. software |ncache|n along with it  if you have the memory to spare.   But then
  933. you probably won't have to worry  about such things,  because controllers
  934. that have built-in |ncache|n cost a fortune!  You most likely don't have one.
  935.  
  936. The other type  of |ncache|n  is a RAM |ncache|n,  which is just a small chunk of
  937. super-fast memory.   It performs the same function for the memory as what
  938. a hard drive |ncache|n does for the hard drive.  It sure speeds things up!
  939.  
  940.               <page down> for The |nSMARTDRV.SYS|n |nDevice Driver|n
  941.                       The |tSMARTDRV.SYS|t Device Driver
  942.  
  943. This is the disk cache that comes with  DOS versions 4 and up.   Ok, it's
  944. not the greatest  disk cache in the world,  at all,  but if it's the only
  945. cache you've got, it's a good one.   You install it, like all device dri-
  946. vers, with a DEVIC|1E or DEVICEHIGH command  in your CONFIG.SYS file.   You
  947. have to have a hard drive, and extended or expanded memory to use it.  If
  948. you have both those types of memory,  use extended (unless you have a lot
  949. more expanded memory to spare than you have of extended |smemory|s).  Because
  950. it's more efficient.
  951.  
  952. Here's the syntax for this device:
  953.           |sDEVIC|1E|s=C:\DOS\SMARTDRV.SYS #### /A
  954. And that assumes,  of course,  that your |nSMARTDRV.SYS|n file  is in the DOS
  955. directory on your C: drive.   The /A switch  means that the cache will go
  956. into expanded memory.   Without the /A,  it will go into extended memory.
  957. The #### parameter  is the size of the cache in kilo|sbytes|s.   Legal values
  958. are from 128 to 8192, with the default being 256, and that's about as low
  959. as you should go.  If you don't have as much memory as you specified, the
  960.                     <page down> for more SMARTDRV.SYS
  961. cache will load anyway,  and just use  whatever memory  you do have.   Of
  962. course the  DEVIC|1E  command  has to appear  later in CONFIG.SYS  than the
  963. extended (|sHIMEM.SYS|s) or expanded memory manager,  or else the cache won't
  964. have any usable memory to go into!
  965.  
  966. Do not ever,  ever,  ever  use a disk optimizer  (a program that fixes up
  967. fragmented files)  with a cache active!   That includes FASTOPEN,  SMART-
  968. Drive,  or any other sort of cache.   If you do,  you may as well get out
  969. your set of BACKUP disks because your FAT is going to get trashed.
  970.  
  971. Keep your  BUFFERS command  at 20 or lower  when you're using SMARTDrive,
  972. and definitely do not use any look-ahead |ssector|ss (that's the part you can
  973. use after a comma on the BUFFERS command).
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.                     <page down> for What Is a RAMdisk?
  981.                             What Is a |tRAMdisk|t?
  982.  
  983. The way to get one of these is just to load the |tRAMDRIVE.SYS|t (for MS-DOS)
  984. or |tVDISK.SYS|t (for PC-DOS) file as a device driver in your CONFIG.SYS file
  985. and then reboot.  Well, now that you have a |nRAMdisk|n, what on earth is it?
  986.  
  987. A |nRAMdisk|n is  a chunk of memory  that has been made to act  like a floppy
  988. disk drive,  only a really fast floppy disk drive!   Because it's  only a
  989. chunk of RAM instead of a mechanical disk drive,  the access time is just
  990. the same  incredibly low number  as the access time for your RAM.   Other
  991. than that, you can use it just exactly the way you'd use a disk.   A |nRAM|n-
  992. disk is also known as a |tVirtual Disk|t.
  993.  
  994. The only thing you have to remember, though, is that the |nRAMdisk|n still is
  995. made of RAM, even if it is acting like a disk drive, so if the power goes
  996. out,  everything that was on the |nRAMdisk|n is gone forever!   You've got to
  997. remember that anything  that's on the |nRAMdisk|n that gets changed,  edited,
  998. or updated,  has to be saved to disk before the power is shut off, or be-
  999. fore some lightning shuts the power off for you, or before you |sreboot|s!
  1000.                        <page down> for more RAMdisk
  1001. It's best to use a |nRAMdisk|n only for files that don't get changed, such as
  1002. your favorite utilities  and DOS command files.   If your hard drive does
  1003. not have  an access time under 20ms,  then you'll be absolutely amazed at
  1004. how much faster  a batch file works if you run it  from a |nRAMdisk|n instead
  1005. of from the hard drive.   Just put your |nRAMdisk|n  at the very beginning of
  1006. the PATH command in your AUTOEXEC.BAT,  so that DOS will look there first
  1007. for all your commands.  If you don't do that, then DOS will find the com-
  1008. mand file on your hard drive first, and run it from there, so it won't be
  1009. doing you any good to put the files onto the |nRAMdisk|n.
  1010.  
  1011. How do  you get  all your  favorite command files,  utilities,  and batch
  1012. files onto the RAMdisk?   You just use COPY commands in your AUTOEXEC.BAT
  1013. file, like this, assuming your |nRAMdisk|n is drive letter F:
  1014.           COPY C:\DOS\CHKDSK.COM F: > NUL
  1015.           COPY C:\DOS\FORMAT.COM F: > NUL
  1016.           COPY C:\DOS\FIND.EXE F: > NUL
  1017.           COPY C:\BELFRY\MENU.BAT F: > NUL
  1018. The reason for the " > |sNUL|s" at the end of each line is because the output
  1019. of each COPY command is going to be a "1 file(s) copied" message, and you
  1020.                        <page down> for more RAMdisk
  1021. don't want to be seeing that every time you boot your computer.  NUL is a
  1022. special imaginary device that DOS uses.   It basically means,  "nowhere".
  1023. (See also Redirection.)
  1024.  
  1025. A |nRAMdisk|n just gets  the next higher letter,  after all the drive letters
  1026. your system already has.   If you already have an E: drive,  your |nRAMdisk|n
  1027. will get the letter F:.   Don't forget that  the default LASTDRIVE is E:,
  1028. so if  your |nRAMdisk|n is going to  give you a higher letter than that,  you
  1029. need to raise your LASTDRIVE by putting a statement like |sLASTDRIVE|s=F into
  1030. your CONFIG.SYS file.   Otherwise DOS won't be able to recognize what you
  1031. mean when you type F: to refer to your |nRAMdisk|n.
  1032.  
  1033. Another type of file  that it's really good to put on a |nRAMdisk|n,  is temp
  1034. files.   These are temporary files  that get created by some applications
  1035. and then deleted by the same application when the app no longer needs it.
  1036. If the instruction manual  for the app says that you can tell it where to
  1037. put its temp files,  then tell it  to put them  on a |nRAMdisk|n.   That will
  1038. make  your app run a lot faster  than it would  if it were using the hard
  1039. drive instead of the |nRAMdisk|n, for its temp files.   Don't worry about the
  1040.                        <page down> for more RAMdisk
  1041. fact that the |nRAMdisk|n will lose all its data if you have a power failure.
  1042. Because even if the temp files were on the hard drive,  if the power went
  1043. out,  the application would have lost its place  in the temp file anyway,
  1044. and the temp file would now be useless to the app and you would just have
  1045. to delete it to free up the space it was taking up on your disk.   So you
  1046. don't lose anything  by having the temp files on the |nRAMdisk|n if the power
  1047. goes out.   You've just saved yourself from  the trouble of finding those
  1048. leftover temp files and deleting them.
  1049.  
  1050. If you have any extended memory,  then a |nRAMdisk|n is  one of the best uses
  1051. for it!   The RAMDRIVE.SYS and VDISK.SYS |sdevice driver|ss contain their own
  1052. extended memory managers, so you don't need any special software in order
  1053. for your |nRAMdisk|n to be able to use your extended memory.  Just add the /E
  1054. switch to the end of that DEVIC|1E command in CONFIG.SYS,  and your |nRAMdisk|n
  1055. will be placed  into extended memory  instead of taking up space  in your
  1056. conventional memory.  (With DOS 5 you do have to load HIMEM.SYS first.)
  1057.  
  1058. If you have  a recent DOS version,  you can also place  your |nRAMdisk|n into
  1059. expanded memory,  if you don't have any extended memory (|sextended|s is more
  1060.                        <page down> for more RAMdisk
  1061. efficient),  by using the /X or /A switch.   Which one is allowed, if ei-
  1062. ther, depends on the DOS version that you have.
  1063.  
  1064. Here is the complete syntax for the  RAMDRIVE.SYS and  VDISK.SYS drivers:
  1065.           |sDEVIC|1E|s=D:\DIR\FILENAME.SYS AAAA BBB CC /E:D /X:D /A:D
  1066. where AAAA is  the size of the |nRAMdisk|n  in Kilo|sbytes|s,  and the default is
  1067. 64.   The BBB parameter stands for  the |ssector|s size  you want the |nRAMdisk|n
  1068. to have.   The choices are 128, 256, and 512, with 128 being the default,
  1069. except for DOS version 5 where the default is 512.  Just use the default.
  1070. The CC parameter means  the number of root directory entries you'll need.
  1071. The default is 64,  so if you're hard up  for space on your |nRAMdisk|n,  and
  1072. you're only going to need a few files at a time, give a smaller number so
  1073. that less |nRAMdisk|n space will be occupied by the directory.  Or if you use
  1074. a small number,  then use one of those directory entries  for a subdirec-
  1075. tory,  and put all the files there.   That way it doesn't matter how many
  1076. files you have on the |nRAMdisk|n.  The /E and /X and /A switches are used if
  1077. you want the |nRAMdisk|n  to be placed into extended or expanded memory.   Of
  1078. course you can only use one of them at a time.   The :D parameter that is
  1079. connected to  the /E or /X or /A is optional,  and it tells DOS  how many
  1080.                        <page down> for more RAMdisk
  1081. |ssector|ss of data to transfer to and from the |nRAMdisk|n at a time.  The D can
  1082. be from 1 to 8,  with 8 as the default,  and you can  pretty much  ignore
  1083. that |sparameter|s;  just leave it at the default,  unless the manual for one
  1084. of your applications tells you otherwise.
  1085.  
  1086. Just don't forget if you ever decide to remove the |nRAMdisk|n line from your
  1087. CONFIG.SYS file,  that all of the applications you may have configured to
  1088. use the |nRAMdisk|n for their temporary files,  will still be looking for the
  1089. |nRAMdisk|n,  and that could cause you big problems.   So remember everything
  1090. that you've told  to use the |nRAMdisk|n,  including batch files,  so in case
  1091. you stop  using the |nRAMdisk|n  you can direct  everything back to your hard
  1092. drive again.
  1093.  
  1094. You can use  as many RAMdisks as you want  at the same time,  if you have
  1095. enough memory, by repeating the DEVIC|1E command that creates the RAMdisks.
  1096. Each |nRAMdisk|n will get the next higher drive letter than the previous one.
  1097.  
  1098.  
  1099.  
  1100.                      <page down> for The |nMODE|n Command
  1101.                              The |TMODE|T Command
  1102.  
  1103. This command has  about a million uses.   This is going to be a long sec-
  1104. tion.   I think that  the most common use for it  is to change  the video
  1105. mode after some program  (usually a game) has messed it up.   If you exit
  1106. a program  and your screen has letters  that are twice their normal size,
  1107. or your screen is so messed up that you can't even tell you have a prompt
  1108. or cursor, try typing |nMODE|n CO80 (that's C-Oh-Eight-Zero) and hit <Enter>.
  1109. There, is that better?   That stands for COlor and eighty columns,  so if
  1110. you don't have a color monitor, use BW80 instead, because that stands for
  1111. Black and White and eighty columns.
  1112.  
  1113. If you have  trouble seeing  the little letters  on the screen,  try |nMODE|n
  1114. CO40  and see if  that helps.   Of course  most applications that you run
  1115. are going to set it back to CO80,  so you'll have to keep setting it back
  1116. to CO40 every time you exit back to DOS.   But a batch file can make that
  1117. easy on you.
  1118.  
  1119. If you have DOS version 4 or 5,  you can use  the |nMODE|n command  to change
  1120.                         <page down> for more MODE
  1121. your keyboard repeat rate.   You know when you hold a key down it is sup-
  1122. posed to zoom across the screen  typing that same letter or function over
  1123. and over again?   Well it doesn't "zoom" very well until you do something
  1124. to raise the repeat rate.   The version 4 |nMODE|n command can do that.  |nMODE|n
  1125. CON: RATE=## DELAY=# is what the command would look like  to perform that
  1126. function,  and you just need  to figure out what you want to use in place
  1127. of ##.   The DELAY= number means  how long you want  to have to hold down
  1128. the key before it  starts repeating.   You can use the numbers  1 through
  1129. 4, and they represent quarter-seconds.   If you use DELAY=1, then if your
  1130. finger accidentally holds the key down for one quarter of a second, what-
  1131. ever letter you're holding down will start zooming across the screen.  If
  1132. you use DELAY=4 you'll have to hold the key down for a full second before
  1133. it will start repeating.  The RATE= parameter specifies approximately how
  1134. many times per second the key should repeat.  You can use any number from
  1135. 1 to 32.   I use |nMODE|n CON: RATE=32 DELAY=2 in my AUTOEXEC.BAT file.   And
  1136. while this command is not a TSR, it does actually change one of the |sCPU|s's
  1137. registers,  so this change you make  with the |nMODE|n command will be effec-
  1138. tive in most of your applications, not just at the DOS command line.   Of
  1139. course some applications  might reset it,  so you would need  to reset it
  1140.                         <page down> for more MODE
  1141. again.  A batch file will make that easy for you.  If you find an applic-
  1142. ation that resets the keyboard repeat rate  (also called typematic rate),
  1143. then start that app from a batch file,  and have the |nMODE|n CON: command as
  1144. the last line  of that batch file,  so that your repeat rate  always gets
  1145. reset between the time you exit the app and the time you see your prompt.
  1146. Of course it's possible  that this command  won't affect your keyboard at
  1147. all.  It works on most systems, but not all.   Can't hurt to try, though.
  1148. The default values are RATE=20 and DELAY=2.   But if you change one,  you
  1149. have to specify both in the command.
  1150.  
  1151. You can use the |nMODE|n command to tell your printer how many characters per
  1152. line  and how many lines per inch to print.   Of course most applications
  1153. that are designed to do any printing will reset the printer, but what you
  1154. set with the |nMODE|n command  will work when you're in DOS,  with the PRINT,
  1155. COPY FILE PRN, or TYPE FILE > PRN commands.   |nMODE|n LPT#:N,M,P is the for-
  1156. mat  for this function  of the |nMODE|n command.   LPT# means which port your
  1157. printer is attached to.  N means how many characters per line, 80 or 132.
  1158. M means how many lines per inch, 6 or 8.  The P you will probably want to
  1159. leave out.  It means that if the printer tells the CPU it's busy, the CPU
  1160.                         <page down> for more MODE
  1161. will keep trying to send more data anyway.  This is called continuous re-
  1162. try.  If you do use the P and your system seems to hang up, you can BREAK
  1163. out of it  with <Ctrl-C>  or <Ctrl-Break>.   (The system will not respond
  1164. right away, though, it will take maybe half a minute.)   This form of the
  1165. |nMODE|n command should only be used with Epson-compatible printers.   If you
  1166. have DOS version 4 or later, this form of the command has changed.   |nMODE|n
  1167. LPT#: COLS=N LINES=M RETRY=P  is what it's  like now.   The old form will
  1168. still work just fine, but if this form is easier for you, then use it in-
  1169. stead.
  1170.  
  1171. If you have DOS version 4.0 or later,  and you have ANSI.SYS installed in
  1172. your CONFIG.SYS file,  and you have an EGA or VGA display, then you might
  1173. use the |nMODE|n command to set your screen to 43 or 50 lines instead of just
  1174. 25.  |nMODE|n CON: COLS=M LINES=N would do it, where M can be 40 or 80, and N
  1175. can be 25 or 43,  or if you have a VGA, then N could also be 50.   And if
  1176. you install ANSI.SYS  with an /L switch,  it will even try  to force your
  1177. applications to display  in this higher number  of lines per screen,  and
  1178. leave the display  in this mode  when you  exit back to DOS,  although it
  1179. won't work for all applications.
  1180.                         <page down> for more MODE
  1181. You can also use |nMODE|n to set the parameters for your COM1 or other serial
  1182. port.   Here's an example of the most common setting for this function of
  1183. the |nMODE|n command:   |nMODE|n COM1:2400,N,8,1,P  where COM1 refers to the comm
  1184. port you're trying to set parameters for.  2400 is the baud rate, N means
  1185. no parity, 8 means 8 data bits per byte, 1 means 1 stop bit,  and P means
  1186. continuous retry for when you're using a serial printer.  The choices for
  1187. port number are 1 or 2 for DOS 3.2 or earlier, or 1 through 4 for DOS 3.3
  1188. or later.  Baud can be 110, 150, 300, 600, 1200, 2400, 4800, or 9600, de-
  1189. pending on the rate supported by your modem and the modem you'll be call-
  1190. ing, and the conditions of the phone lines from here to there.   DOS ver-
  1191. sion 3.3 adds a rate of 19200 to those choices.  Parity can be None, Odd,
  1192. or Even.  Data bits can be 7 or 8, stop bits can be 1 or 2, and the P can
  1193. be there or not.  For DOS version 4, of course this form of the |nMODE|n com-
  1194. mand changed too.  |nMODE|n COM#: BAUD=B PARITY=Y DATA=D STOP=S RETRY=P.  Now
  1195. you're probably thinking that this form of the command is only for modems
  1196. but that's not the case!   In fact, it is rarely used for modems, because
  1197. most people use  specialized communications software to work with the mo-
  1198. dem, and it sets the parameters for them.   This form of the |nMODE|n command
  1199. is more often used for serial printers and mice and such things.
  1200.                         <page down> for more MODE
  1201. If you have  a serial printer instead of a parallel printer,  you need to
  1202. use the |nMODE|n command to tell DOS  to send whatever data it would normally
  1203. send to LPT1,  to your serial port instead.   This command's  syntax is a
  1204. lot easier  than some of the other forms of the |nMODE|n command.   It's like
  1205. this:   |nMODE|n LPT1:=COM#:  where # is the number  of the serial port  your
  1206. printer is connected to.   But first you have to use  the other |nMODE|n com-
  1207. mand above to tell your serial port what parameters to use.   Yes, that's
  1208. right, the difficult one with the baud rate,  parity,  stopbits,  and all
  1209. that.   But your printer manual should tell you  exactly which parameters
  1210. to use so you shouldn't have to  figure it out by yourself.   If you want
  1211. to put the printer output back to LPT1, then |nMODE|n LPT1: will do that.  If
  1212. you want to redirect |sLPT1|s's output to another parallel port, like LPT3 or
  1213. something, sorry but |nMODE|n can't do that.  You'll need a shareware or pub-
  1214. lic domain program from your local BBS.
  1215.  
  1216. While most functions  of the |nMODE|n command  do not involve  loading a TSR,
  1217. some do.   If you see the message  "Resident portion of |nMODE|n loaded",  it
  1218. means  that you did  use one of  the functions  of the |nMODE|n command  that
  1219. loads |nMODE|n as a TSR.
  1220.                     <page down> for The |nPRINT|n Command
  1221.                             The |TPRINT|T Command
  1222.  
  1223. This command is used to send a copy of a file to your printer.   It's the
  1224. very oldest example  of a multitasker under DOS,  because it works in the
  1225. background  to keep on  printing your file,  even after it has  given you
  1226. back your DOS prompt and you have begun working on something else!
  1227.  
  1228. Bear in mind though, that this is not the only way to print a file!   You
  1229. can use the COPY FILENAME PRN command  or the TYPE FILENAME > PRN command
  1230. just as well.  They don't take up any memory.   Of course they don't give
  1231. you back the DOS prompt either,  until they've sent the whole file to the
  1232. printer's buffer.   So for short files, use one of those.  But for a long
  1233. file  that you want to print  without waiting  for it to finish,  use the
  1234. |nPRINT|n command.
  1235.  
  1236. The DOS version 4 installation program  puts this command right into your
  1237. AUTOEXEC.BAT file.   If you don't use it very often, and if you don't use
  1238. the Print option within the DOSSHELL,  then you want to remove |nPRINT|n from
  1239. your AUTOEXEC.BAT  because it's  taking up  a lot of memory  for nothing.
  1240.                         <page down> for more PRINT
  1241. The same thing goes for the GRAPHICS command.
  1242.  
  1243. This is not the complete syntax of the |nPRINT|n command,  but it's about the
  1244. only important parts.   Hardly anybody  ever uses  the other parts so I'm
  1245. not going to confuse you with them:
  1246.           |nPRINT|n /D:PORT /Q:## /C /T D:\DIR\FILENAME.EXT
  1247.  
  1248. The first time you use this command after the last time you |sreboot|sed,  it
  1249. loads itself  into memory as a TSR.   It also wants to know what port you
  1250. intend for it  to print to.   It will  ask you,  and it will  fill in the
  1251. blank with PRN.   If PRN is the port  you want to use,  then you just hit
  1252. <Enter>.   Otherwise,  you type the name of port you do want to use,  and
  1253. hit <Enter>.   If you want to avoid  having |nPRINT|n ask you  that question,
  1254. then you include  the /D:PORT switch  right on the command line  with the
  1255. |nPRINT|n command,  as in  |nPRINT|n /D:LPT1  or |nPRINT|n /D:COM2,  or wherever your
  1256. printer is attached.  Now that's the port that the |nPRINT|n command is going
  1257. to use from then on,  until you reboot  the computer.   You can't use the
  1258. /D:PORT  switch  again to  change it  to something else.   If you want to
  1259. change it, you have to reboot and start the |nPRINT|n TSR all over again.
  1260.                         <page down> for more PRINT
  1261. Now the |nPRINT|n TSR is installed into memory, and the print |nqueue|n is empty.
  1262. (The print |tqueue|t is the internal list  where the |nPRINT|n command stores the
  1263. names of the files that you've told it to print, that haven't been print-
  1264. ed yet.)   Or if you did  put the filename  on the command line  when you
  1265. loaded the TSR into memory,  then that file goes right into the |nqueue|n and
  1266. starts printing.   Now if you think of another file  you'd like to print,
  1267. you just give another |nPRINT|n command with that second filename on the com-
  1268. mand line,  and that file will be  added to the |nqueue|n  (that's pronounced
  1269. just like  the letter Q,  by the way),  and when  the first file  is done
  1270. printing, |nPRINT|n will look at the |nqueue|n and print any files that are there
  1271. waiting to be printed.  The |nqueue|n can hold up to ten filenames at a time.
  1272. If you need to be able  to |nqueue|n up more files  than that at a time,  you
  1273. can use the /Q:## switch on the command line, but only the first time you
  1274. issue the command.   If you've already loaded  the |nPRINT|n TSR into memory,
  1275. then you have to reboot  before you can issue a command like  |nPRINT|n /Q:20
  1276. to enlarge the |nqueue|n.  Any number up to 32 is allowed there.
  1277.  
  1278. If your printer dies or if the paper gets all jammed up, you can just say
  1279. |nPRINT|n /T and that terminates the printing  and removes all the files from
  1280.                         <page down> for more PRINT
  1281. the queue.  (However, it doesn't remove the |nPRINT|n TSR from memory.)   Now
  1282. you can fix the printer or the paper, and start over.  Remember that your
  1283. printer contains a small buffer of memory  where it stores data that it's
  1284. about to print.  When you use |nPRINT|n /T to terminate printing, the printer
  1285. won't stop until it prints what's already in its own buffer,  even though
  1286. |nPRINT|n immediately stops sending new data to the printer.
  1287.  
  1288. If you just decide  there's one file  that you had  already  put into the
  1289. print queue,  that you don't  want to print after all,  you can remove it
  1290. from the print queue with the command  |nPRINT|n /C D:\DIR\FILENAME.EXT which
  1291. will cancel that file from the queue.
  1292.  
  1293. You can also use  wildcards with this command.   That means you could put
  1294. all the files  that start with  PB and have the extension  .TXT  into the
  1295. queue with just one  |nPRINT|n PB*.TXT command.   The names of the files that
  1296. match that wildcard specification will be displayed on the screen, and if
  1297. you realize  that you didn't mean to include  a couple of those,  you can
  1298. remove those from the queue with the /C switch.
  1299.  
  1300.                         <page down> for more PRINT
  1301. And you can put  more than one file  into the queue  at a time  by typing
  1302. each filename on the command line,  for example just one command:   |nPRINT|n
  1303. C:\DOS\README.TXT C:\DOS\APPNOTES.TXT would print those two files.
  1304.  
  1305. If you have DOS version 2, then you can only print files from the current
  1306. directory of any drive.  If you want to print a file from some other dir-
  1307. ectory, you have to use the CHDIR command to make that directory current,
  1308. and then you can use the |nPRINT|n command to add that file to the queue.
  1309.  
  1310. If you want  to see what files  are left in the queue  at any time,  just
  1311. issue the |nPRINT|n command with no parameters.
  1312.  
  1313. If you've ever heard the term "print |tspooler|t" and wondered what it meant,
  1314. the |nPRINT|n command  is just a  primitive example  of a print |nspooler|n.   It
  1315. means a little TSR utility  that keeps sending data  to the printer while
  1316. you go ahead and use the computer for something else.
  1317.  
  1318. Just like  the TYPE command,  |nPRINT|n will ignore  any data  in a file that
  1319. occurs after the first ^Z character.
  1320.                    <page down> for The |nRECOVER|n Command
  1321.                            The |TRECOVER|T Command
  1322.  
  1323. This is a command  you want to  be very careful with.   In fact you might
  1324. want to remove it from your disk,  or RENAME it to  DESTROY or something,
  1325. so that you don't ever forget how dangerous it is and use it by accident.
  1326.  
  1327. What it's supposed to be used for,  is to retrieve one file at a time, no
  1328. more than  one at a time,  from a disk  that has been damaged.   You see,
  1329. when part of a file is sitting in a disk |ssector|s that's gone bad, DOS just
  1330. won't do anything with any part of that file.   Well, the way to get back
  1331. all the readable parts is with the |nRECOVER|n command.  The syntax is:
  1332.           |nRECOVER|n D:\DIR\FILENAME.EXT
  1333. and as usual,  if the file in question is in the current directory of the
  1334. current drive,  you can leave that part out and say |nRECOVER|n FILENAME.EXT.
  1335. This will cause DOS to take the readable parts of the file and stick them
  1336. into a file  (either with the same name,  or with the name  FILE0000.REC,
  1337. depending on your DOS version) in the root directory of the disk in ques-
  1338. tion.  It will also mark the |sbad sector|ss as "unusable" in the FAT so that
  1339. DOS never tries to stick any more data in that spot.  So, now what do you
  1340.                        <page down> for more RECOVER
  1341. do with it?   Well, if it used to be a .COM or .EXE file, you're going to
  1342. delete it.   It's got  a chunk missing  out of the middle,  where the bad
  1343. |ssector|s was,  so there's no telling  what it might do  to your computer if
  1344. you try to run it.   (But don't just delete it  instead of RECOVERing it!
  1345. Because if you  |nRECOVER|n it first,  then the bad sector  will be marked as
  1346. bad in the FAT so DOS will never try to put a file into that spot again.)
  1347. If it was a word processor or spreadsheet file,  on the other hand, well,
  1348. at least you got  most of it back,  right?   It's better than  losing the
  1349. whole file.   You just have some work to do,  to put it back to its prev-
  1350. ious shape.   (If you kept a BACKUP like you're supposed to, you wouldn't
  1351. have such problems.)
  1352.  
  1353. All right, that's fine,  it sounds like it will work for just one file at
  1354. a time.   But if you have a floppy disk  that's a total wreck and a whole
  1355. bunch of files are giving  "Data error reading drive A:" messages and you
  1356. are sure that the problem is not just a drive that needs cleaning, do you
  1357. have to use the |nRECOVER|n command on every file separately?  Well, it's not
  1358. a bad idea.  It's a heck of a lot more sensible than RECOVERing the whole
  1359. disk.   You can't use wildcards with this command.  Your only choices are
  1360.                        <page down> for more RECOVER
  1361. one file at a time, or the whole disk at a time.   And RECOVERing a whole
  1362. disk at a time  is just about  the silliest thing you could  possibly do,
  1363. unless the directory itself is what has the |sbad sector|ss.
  1364.  
  1365. If you really have a disk with hardly anything but |sbad sector|ss, the first
  1366. thing you should do is make a DISKCOPY of it and try to |nRECOVER|n the copy,
  1367. not the original.  That way, if the recovery operation is a big flop, you
  1368. can take the original and start over,  only this time take it to a friend
  1369. who has PC Tools or the Norton Utilities running.
  1370.  
  1371. Next,  use XCOPY with the /S switch to get all the data you can from that
  1372. disk, onto some other disk, then whichever files get copied successfully,
  1373. delete those from the damaged disk.  And if the copying and deleting emp-
  1374. tied any subdirectories on the disk,  then RMDIR them.   That way,  there
  1375. won't be so many files left on the disk to get mixed up.   Now,  the only
  1376. files left on the disk  are the damaged ones,  so |nRECOVER|n and then delete
  1377. each of the .COM and .EXE files too, because even if you |nRECOVER|n them you
  1378. won't be able to use them,  for the reason stated above.   Now all that's
  1379. left is the data files that need to be recovered.
  1380.                        <page down> for more RECOVER
  1381. If you have  a disk where the directory structure itself  is what has the
  1382. |sbad sector|ss,  you won't  be able to access  any files on the disk at all.
  1383. First,  make a DISKCOPY of it,  and then use  the |nRECOVER|n command  on the
  1384. copy.   Or if you have a backup copy of the disk,  just trash the damaged
  1385. one and forget about the |nRECOVER|n command.
  1386.  
  1387. To |nRECOVER|n a whole disk, the syntax is |nRECOVER|n D: and that's all there is
  1388. to it.   All the files  on the whole disk,  including the  subdirectories
  1389. themselves,  will be  RECOVERed  and you'll end up  with a root directory
  1390. full of nothing but  FILE####.REC files,  because that's what the |nRECOVER|n
  1391. command will name them.   FILE0001.REC, FILE0002.REC, etc.   If there are
  1392. too many files  to fit in the  root directory  (remember that  there is a
  1393. limit to the number of entries allowed  in any root |sdirectory|s),  the com-
  1394. mand will stop,  and you should  COPY the .REC files  to another disk and
  1395. delete them from the damaged disk, and enter the |nRECOVER|n command again so
  1396. it can finish the rest of the disk.   Then comes the hard part,  figuring
  1397. out which FILE####.REC file is supposed to have what name.
  1398.  
  1399. If you ever accidentally use the |nRECOVER|n command on a disk when you meant
  1400.                        <page down> for more RECOVER
  1401. to use RESTORE instead,  or if you just didn't know  what horrible things
  1402. |nRECOVER|n would do to your files, then do not pass GO, do not collect $200,
  1403. just go straight to  PC Tools or the Norton Utilities  or if you have DOS
  1404. version 5, the UNFORMAT command.   If it's a floppy disk, make a DISKCOPY
  1405. of it first though,  in case the Utilities don't work the first time, you
  1406. can start over on the copy.
  1407.  
  1408. There's one other thing  the |nRECOVER|n command is useful for,  though.   If
  1409. you have a floppy disk  from which you want to  ERASE all the files,  but
  1410. the disk has  subdirectories on it,  you would have to  delete all of the
  1411. files from one subdirectory,  RMDIR the directory,  delete the files from
  1412. the next subdirectory,  remove it, etc,  and then delete all the files in
  1413. the root directory.   Well there is  an easier way,  if you're absolutely
  1414. positive that you want that whole disk erased.   |nRECOVER|n A:  will put all
  1415. the files  into the  root directory,  and convert  the subdirectories  to
  1416. files,  and put them in the  root directory too,  so that DEL A:\*.* will
  1417. remove everything  from the whole disk  (except the volume label).
  1418.  
  1419. If you  ever see  the error message  "|tSector not found|t",  a bad sector is
  1420.                        <page down> for more RECOVER
  1421. probably the cause of it  and |nRECOVER|n  is the cure  if you don't have the
  1422. Norton Utilities or PC Tools.  See the section about the NUL device for a
  1423. method of finding out  which file is the culprit  if your program doesn't
  1424. tell you which one it is.
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.                    <page down> for The |nREPLACE|n Command
  1441.                            The |TREPLACE|T Command
  1442.  
  1443. This command is good especially for updating  to a new version of a soft-
  1444. ware package.   With the /U switch,  it will take all the files  from the
  1445. source disk that have the same names,  but later dates, than the files on
  1446. the target disk.   Then you can use it  one more time  with the /A switch
  1447. instead of the /U,  to add all the files that are on the source disk that
  1448. don't exist on the target disk.  Pretty easy, huh?
  1449.  
  1450. Here's the complete syntax:
  1451.           |nREPLACE|n D:\DIR\FILENAME.EXT D:\DIR\ /A /P /R /S /U /W
  1452. where the first D:\DIR\ is where the source files are, and the second D:\
  1453. DIR\ is where you want the files to go.  Here are the switches:
  1454.  
  1455. The /A switch makes |nREPLACE|n add the files  that exist on the source disk,
  1456. that do not exist on the target disk.  This is the switch you want to use
  1457. after you've already run the |nREPLACE|n command with the /U switch.  This is
  1458. also the switch you want to use  if all you want to do is copy files that
  1459. do not exist already on the target disk.  Very handy!   But it only works
  1460.                        <page down> for more REPLACE
  1461. in the specified target directory.   In other words, you can't use the /S
  1462. switch with the /A switch.
  1463.  
  1464. The /P switch makes |nREPLACE|n pause and ask for permission before each file
  1465. it copies.
  1466.  
  1467. The /R switch  makes |nREPLACE|n update  even the files that have their Read-
  1468. only attributes turned on.   Only it doesn't set  the R attribute for the
  1469. file after it writes it, you have to do that yourself if you want the new
  1470. version of the file to have its R attribute set.
  1471.  
  1472. The /S switch  causes |nREPLACE|n  to search subdirectories  of the specified
  1473. target directory,  for files that need to be updated.   It doesn't search
  1474. subdirectories of the source directory, though, just the target.  Now you
  1475. want to be careful with this switch, because there might be a file in one
  1476. of the subdirectories,  that has the same name as one of the files on the
  1477. source disk, but that has no relation to the program you're updating.  If
  1478. so, that file will be overwritten by the file on the source disk that has
  1479. the same name.  It's also useful if you have more than one copy of a cer-
  1480.                        <page down> for more REPLACE
  1481. tain file  on your disk,  in different subdirectories,  and you receive a
  1482. newer copy of that file.   If you're sure that all the files  on the disk
  1483. that have that name,  are the same file  and you want  them all  replaced
  1484. with the new version, use the root directory as the target and use /S.
  1485.  
  1486. The /U switch  makes |nREPLACE|n work  only with files that have a later date
  1487. and time on the source disk than the date on the target disk.  That means
  1488. you won't replace a newer file  with an older file.   This switch did not
  1489. exist until DOS version 4, though.
  1490.  
  1491. The /W switch  makes |nREPLACE|n stop for a second  and let you change disks,
  1492. between the time you enter the command and the time it will start looking
  1493. for files to copy.   That's for if you have  the |nREPLACE|n.EXE file  on one
  1494. disk,  and the source files on some other disk of the same size,  you put
  1495. the disk that contains |nREPLACE|n.EXE into the drive, enter the command with
  1496. the /W switch,  and it will let you take out the |nREPLACE|n.EXE disk and put
  1497. in the source disk instead, and then it will start copying.
  1498.  
  1499. So what you usually want to do  is run the |nREPLACE|n command  once with the
  1500.                        <page down> for more REPLACE
  1501. /A switch and once with the /S and /U switches, for each directory on the
  1502. source disk that contains files you want to have updated.   If the source
  1503. files are all in just one directory,  then you only need to use those two
  1504. commands one time each, to update the whole program.
  1505.  
  1506. You're probably wondering  what use this command is,  when you could just
  1507. use  the XCOPY command  to copy them all with just one command?   Well if
  1508. the target files  are in different directories,  like maybe  C:\WORD  and
  1509. C:\WORD\DOCS and C:\WORD\LTRS and C:\WORD\NOTES, and all the source files
  1510. are in one directory  on the A: drive,  for example,  then a command like
  1511. XCOPY A:*.* C:\WORD  would put all the files  into the C:\WORD directory,
  1512. even if some of them belong  in some of those  subdirectories  of the C:\
  1513. WORD directory.   The |nREPLACE|n command  will look to see where you already
  1514. have each file,  and put the later copy  of each file into the right sub-
  1515. directory.  The only problem is, files that exist on the source disk that
  1516. didn't exist on the target disk,  will all be put into the same directory
  1517. on the target disk, unless you fiddle with the /P switch a lot.
  1518.  
  1519. Ok, that's not exactly the only problem.   The |nREPLACE|n command, like most
  1520.                        <page down> for more REPLACE
  1521. commands,  will not copy Hidden files,  nor those that have  their System
  1522. attributes set.   But for programs  that don't use  any of those types of
  1523. files,  and that don't have their own installation routines,  this can be
  1524. a very helpful command.
  1525.  
  1526. There's one thing you need to be careful of though,  when using REPLACE's
  1527. /U switch!   Since it works according to  the date and time stamps in the
  1528. directory entries,  then if your clock,  or the clock in the system  that
  1529. created the files you're installing, is wrong or has been wrong, then you
  1530. could end up overwriting new files with older files, or not replacing old
  1531. files that should have  been replaced!   The |nREPLACE|n command can only as-
  1532. sume that the date and time stamps are correct, and so it acts according-
  1533. ly.   It doesn't know any better.   Keep your system clock set right, and
  1534. take a look at the dates  of the source files  before you use the |nREPLACE|n
  1535. command, and make sure they look kosher.
  1536.  
  1537.  
  1538.  
  1539.  
  1540.                    <page down> for The |nRESTORE|n Command
  1541.                            The |TRESTORE|T Command
  1542.  
  1543. This is  the command  that you must use  in order to get  your files back
  1544. from your floppy disks  after you've backed them up.   The BACKUP command
  1545. puts all the files it backs up into one great big file, so |nRESTORE|n is the
  1546. only way you'll ever see those files again, if your hard drive dies.
  1547.  
  1548. The syntax of the |nRESTORE|n command is like this:
  1549.           COMMAND SOURCE TARGET SWITCHES
  1550. just like most DOS commands.  So let's discuss those parts one at a time.
  1551.  
  1552. The command is |nRESTORE|n, but like any external command, if the |nRESTORE|n.COM
  1553. file is neither in the current directory nor in a directory on your PATH,
  1554. then you'll have to specify the entire |spath|sname to the command as part of
  1555. the command.  That means you might say C:\DOS\RESTORE instead of |nRESTORE|n.
  1556.  
  1557. The source is  the drive where the files are,  that you want to have res-
  1558. tored to the hard drive.  Usually just A: or B:.
  1559.  
  1560.                        <page down> for more RESTORE
  1561. The target is where you want the files to end up.  If you want to restore
  1562. the entire hard drive,  then the target would be C:\*.*.   If you want to
  1563. restore only the files that start with BR in the \BROWN subdirectory, the
  1564. target would be C:\BROWN\BR*.*.  (See also Wildcards.)  Or if you want to
  1565. restore just the AUTOEXEC.BAT file,  the target would be C:\AUTOEXEC.BAT.
  1566.  
  1567. The hardest part  to figure out,  about the |nRESTORE|n command,  is that the
  1568. filenames and  the directory structure  are stored as  part of the backup
  1569. disks,  and that's the way  they get restored.   If you used to keep your
  1570. word processing program  in a directory named  \WORD,  back when you made
  1571. the backup disks, and nowadays you keep it in a directory named \WP, then
  1572. if you use the command  |nRESTORE|n A: C:\WP\*.*  then the |nRESTORE|n command is
  1573. going to give you a nasty error message like "No files found to restore",
  1574. because you didn't have any files named \WP\*.*  at the time you made the
  1575. backup disks.   Those files used to be called  \WORD\*.* instead.   So in
  1576. order to restore them,  you'll have to use |nRESTORE|n A: C:\WORD\*.* and the
  1577. |nRESTORE|n command will create a directory  called C:\WORD and put the files
  1578. there,  and then you'll have to use the COPY command to put them into the
  1579. \WP directory,  then delete the files from the  \WORD directory and RMDIR
  1580.                        <page down> for more RESTORE
  1581. the \WORD directory.  Restoring those files to D:\WORD wouldn't have been
  1582. a bit of a problem though.  Different drive but same directory, is ok.
  1583.  
  1584. So,  what switches are available with the |nRESTORE|n command?   Quite a few:
  1585.           /S   /P   /N   /M   /A:date   /B:date   /L:time   /E:time
  1586. The /S switch  tells DOS to also restore  the files in the subdirectories
  1587. of the  target directory.   If you had a directory named  C:\WORD\LETTERS
  1588. below your C:\WORD directory,  and you used C:\WORD\*.*  as the target of
  1589. the |nRESTORE|n command,  then if you leave out  the /S switch,  the files in
  1590. C:\WORD\LETTERS  will not be restored,  or if you include  the /S switch,
  1591. then they will be restored.  If you want to restore all the files on your
  1592. entire hard drive, then you always have to specify the /S switch, as well
  1593. as using C:\*.* as your target.
  1594.  
  1595. The /P switch tells DOS to pause and ask you  for confirmation every time
  1596. it encounters any files  that either have  their Read-only attributes set
  1597. on the target drive,  or that have a more recent copy on the target drive
  1598. than the copy on the backup disk.  In most cases, if the copy on the tar-
  1599. get drive is newer than the copy on the backup disk, then you probably do
  1600.                        <page down> for more RESTORE
  1601. not want |nRESTORE|n to overwrite  the newer copy with the older copy.   How-
  1602. ever, if you know that the newer copy on the target drive has been ruined
  1603. in some way, then yes, you do want to restore the older copy.
  1604.  
  1605. The /N switch only came into existence with version 3.3 of DOS,  and it's
  1606. about time!  This switch will find all the files that exist on the backup
  1607. disks, that no longer exist on the target disk.  That means if you delete
  1608. a bunch of files accidentally,  you can just restore them from the backup
  1609. disks without going through a complete restore!   There is one very small
  1610. problem with this,  however.   If you have |sRENAME|sd a file  since you made
  1611. the backup,  the /N switch of |nRESTORE|n will find that the file  (under its
  1612. old name)  no longer exists  on the target disk  (because it now has some
  1613. other name)  so it will restore that file.   So now you have the old copy
  1614. of the file, under its old name, as well as the |ncurrent|n copy of the file,
  1615. under its new name.   That's a waste of hard disk space!   So be sure and
  1616. check for this sort of thing whenever you use the /N switch with |nRESTORE|n,
  1617. and delete the old copies of |sRENAME|sd files.
  1618.  
  1619. The /M switch  does the same thing as the /N switch,  and more!   It also
  1620.                        <page down> for more RESTORE
  1621. restores any files that have been changed since the backup was made.   It
  1622. will replace  the more recent copy of the file,  with the old out-of-date
  1623. copy.   This is useful  for when you've made  some sort of a big goof and
  1624. messed up all your hard drive's data files,  and you need to get back the
  1625. old copies from before you did that.
  1626.  
  1627. The next four switches are all new with version 3.3 of DOS,  and they all
  1628. have to do with time.   The /A switch will restore all the files from the
  1629. backup disks that have a date that's the same or later  than the date you
  1630. specify with the /A:date switch.   The /B switch  will restore all of the
  1631. files whose date is the same or earlier than the date you specified.  The
  1632. /L:time and /E:time switches  must only be used with the /A or /B switch.
  1633. /L means files that have the same time  or a later time  than the one you
  1634. specify,  and /E means files whose time is  the same or earlier  than the
  1635. one you specified.
  1636.  
  1637. Before version 3.3 of DOS, the BACKUP command backed up the Hidden Files,
  1638. which are  IO.SYS and MSDOS.SYS for MS-DOS,  or IBMBIO.COM and IBMDOS.COM
  1639. for PC-DOS,  so that if you upgraded  to a new DOS version,  and then you
  1640.                        <page down> for more RESTORE
  1641. needed to restore some files  from your old backup disks,  you would have
  1642. to be very careful to see that |nRESTORE|n didn't try  to put your old Hidden
  1643. files back on the disk, right over top of the ones from your new DOS ver-
  1644. sion!   If you still have version 3.2  or an earlier version,  then watch
  1645. out for this.   But of course now that  Microsoft is selling  DOS version
  1646. 5.0 right to the public,  instead of only to computer dealers, there's no
  1647. reason for you to stick with an old version.  DOS 5 is fantastic!
  1648.  
  1649. Many previous  versions  of the DOS  |nRESTORE|n command  could only  restore
  1650. files  that were made  by the BACKUP command  from that same DOS version.
  1651. But not DOS 5.0!  It can restore backup files from DOS 2.11 or later.
  1652.  
  1653. There is also a new switch for the DOS 5 |nRESTORE|n command.   The /D switch
  1654. will show you what files will be restored by the command you are entering
  1655. but it will not  restore any files.   Use the command  with the /D switch
  1656. first, as a test,  and if it shows you the right filenames, you enter the
  1657. same command again, only without the /D switch, to restore them.
  1658.  
  1659.  
  1660.                     <page down> for The |nSELECT|n Command
  1661.                             The |TSELECT|T Command
  1662.  
  1663. In version 3  of DOS,  this command  has to do with  code page switching.
  1664. The DOS version 4 |nSELECT|n command  is the installation program  which puts
  1665. DOS 4 onto your hard drive,  and since DOS 5 was released three weeks ago
  1666. I'm sure  no one is going  to buy a new copy of  the old version 4,  so I
  1667. won't waste your time on this one.
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.                     <page down> for The |nSHARE|n Command
  1681.                             The |TSHARE|T Command
  1682.  
  1683. This is a TSR that you need to load every time you boot up, if you are on
  1684. a Network or if you are using DOS version 4 and you have one or more hard
  1685. drive |spartition|ss of a size over 32 mega|sbytes|s.  I mean it, if you have any
  1686. logical drives that are larger than 32 megs and you are using DOS version
  1687. 4.0 then you have got to load |nSHARE|n or really terrible things will happen
  1688. to your data.   This is not an idle threat.   DOS didn't really and truly
  1689. learn how to deal with  these large drives  until version 5,  although in
  1690. version 4  it became possible  to have them that big.   |nSHARE|n is the only
  1691. thing that makes it safe to have  those large |spartition|ss under version 4.
  1692.  
  1693. It's easy  to make |nSHARE|n load itself  every time you boot up.   Just make
  1694. sure the |nSHARE|n.EXE  file is located in the  same directory  that contains
  1695. your COMMAND.COM file,  and DOS will load it automatically.   Or,  if for
  1696. some reason that's not working,  then put  |sINSTALL|s=C:\DOS\SHARE.EXE  into
  1697. your  CONFIG.SYS file and that will definitely load it.   Of course, then
  1698. make sure  the |nSHARE|n.EXE file  is in the C:\DOS directory  where you told
  1699. CONFIG.SYS it was at.
  1700.                         <page down> for more SHARE
  1701. Now if you have DOS version 4  and a large hard drive partition,  and DOS
  1702. doesn't find the |nSHARE|n.EXE file in order to load it,  it'll give you this
  1703. error message:  "Warning!   |nSHARE|n must be loaded for large media".   (The
  1704. type of disk  you're using is what |tmedia|t means.)   You can also use |nSHARE|n
  1705. from the AUTOEXEC.BAT file,  but if you do,   you will still receive that
  1706. error message, because that message comes up before the AUTOEXEC.BAT file
  1707. gets read,  so DOS will just think that you were planning to skip loading
  1708. |nSHARE|n.  Besides, if something that comes earlier in AUTOEXEC.BAT than the
  1709. |nSHARE|n command, is something that writes to the disk, then you're in trou-
  1710. ble since |nSHARE|n has not been loaded yet.   So it's really best to use one
  1711. of the other methods to load |nSHARE|n.
  1712.  
  1713. Another thing that |nSHARE|n does in version 4,  is it checks the serial num-
  1714. ber on your floppy disk before it allows anything to be written to it, to
  1715. make sure you didn't change disks.   That way,  DOS won't trash the flop-
  1716. py's FAT by writing info that was supposed to go on one disk,  to another
  1717. disk, after you changed disks without DOS realizing it.
  1718.  
  1719. But on the other hand,  another thing that |nSHARE|n does is to refuse to let
  1720.                         <page down> for more SHARE
  1721. you do a bunch of things you might want to do.  It thinks it's protecting
  1722. your hard drive,  but sometimes it just  gets a little carried away.   So
  1723. when I  first got DOS 4  and an 85 meg hard drive,  I only used |nSHARE|n for
  1724. about three days before I got fed up  and decided to use  FDISK to repar-
  1725. tition my drive into smaller logical drives, so that I didn't need to use
  1726. |nSHARE|n anymore.   You might end up doing the same thing.   Then again,  if
  1727. you just get DOS version 5, you can have a partition as large as you want
  1728. without needing |nSHARE|n.
  1729.  
  1730. Now one thing  that hardly anybody  ever remembers.   If you need to load
  1731. |nSHARE|n every time you boot, then the |nSHARE|n.EXE file also has to be located
  1732. on every copy of every  floppy disk you ever boot from.   Having |nSHARE|n in
  1733. the right directory on your hard drive  to make DOS load it automatically
  1734. during |sboot|sup,  doesn't do a bit of good  when you're |sboot|sing from floppy
  1735. disk.   Put |nSHARE|n.EXE into the same directory with COMMAND.COM,  on every
  1736. disk you ever boot from.
  1737.  
  1738.  
  1739.  
  1740.                     <page down> for The |nSUBST|n Command
  1741.                             The |TSUBST|T Command
  1742.  
  1743. This is a command that's kind of dangerous (although it's certainly safer
  1744. than |sASSIGN|s), but it does have its uses if you follow the rules.
  1745.  
  1746. It is used to make a directory pretend like it is a drive.   For example:
  1747.           |nSUBST|n G: C:\WORD\DOCS\LTRS\JOHN
  1748. After you enter that command you can reference the C:\WORD\DOCS\LTRS\JOHN
  1749. directory by simply typing G:.
  1750.  
  1751. Of course for that command to work  you have to use the LASTDRIVE command
  1752. in your CONFIG.SYS file to tell DOS you'll be needing a G: drive.  If the
  1753. highest drive letter  you already have is D:,  then you want to say some-
  1754. thing like |nSUBST|n E: C:\WORD\DOCS\LTRS\JOHN  instead of using G:, and then
  1755. you'll only need to say |sLASTDRIVE|s=E, instead of G, in CONFIG.SYS.
  1756.  
  1757. To cancel a SUBSTitution  and put things  back to normal,  |nSUBST|n G: /D or
  1758. |nSUBST|n E: /D  will do it.   To display a list of SUBSTitutions you have in
  1759. effect, type |nSUBST|n all by itself, with no parameters.
  1760.                         <page down> for more SUBST
  1761. There are a bunch of commands  that are unsafe for use  with any |nSUBST|n in
  1762. effect:  ASSIGN, BACKUP, CHKDSK,  DEL, DISKCOMP, DISKCOPY,  ERASE, FDISK,
  1763. FORMAT, LABEL, JOIN, MIRROR, RECOVER, RESTORE, and SY|1S.
  1764.  
  1765. So why would anybody  want to use a command  that gives problems  with so
  1766. many other DOS commands?   Well there are quite a few times  when this is
  1767. useful.   For one thing,  if you find that your PATH environment variable
  1768. is too long,  and you don't have time right now to reorganize your entire
  1769. hard drive  or write batch files so you can shorten it,  you can do |nSUBST|n
  1770. E: C:\WORD and |nSUBST|n F: C:\UTIL  and replace C:\WORD with E:\ and C:\UTIL
  1771. with F:\ on your PATH command  in your AUTOEXEC.BAT file,  and that saves
  1772. you 8 characters.   But that is not a permanent solution to the 127-char-
  1773. acter limit for the PATH variable!   Use batch files or DOSKEY macros in-
  1774. stead of a long PATH.
  1775.  
  1776. What if you have an application such as an old version of WordStar,  that
  1777. doesn't know anything about |spath|snames and stuff?   You can trick WordStar
  1778. into using subdirectories by saying  |nSUBST|n E: C:\WORD\DOCS and then tell-
  1779. ing WordStar to pull up a file from your E: drive.
  1780.                         <page down> for more SUBST
  1781. And then  there's always the reason of  just plain laziness.   It's a lot
  1782. easier to type E:  than it is to type C:\WORD\DOCS\LTRS\JOHN.   But in my
  1783. opinion that is nowhere near  a good enough reason  to use such a danger-
  1784. ous command!
  1785.  
  1786. You can also do something like this:
  1787.           |nSUBST|n A: C:\TEMP
  1788. for programs that insist on using drive A: when you want them to use your
  1789. hard drive.   After you issue that command, whenever the program requests
  1790. something from drive A:,  DOS will give it something from the TEMP direc-
  1791. tory of drive C: instead.
  1792.  
  1793. Or for programs  that want drive A:,  and you made the mistake  of buying
  1794. the program  on the wrong size disks,  and you can only  use them in your
  1795. B: drive,  and the program won't work because  it wants drive A:,  and oh
  1796. my, what are you going to do?   Try |nSUBST|n A: B:\ and see if it works.  It
  1797. has the same effect as ASSIGN A=B but it's much safer.
  1798.  
  1799. Of course,  you can't use your A: drive while one of these commands is in
  1800.                         <page down> for more SUBST
  1801. effect,  because whenever you tell DOS something about A:,  it will think
  1802. you're talking about C:\TEMP or B:\ or whatever is SUBSTituted for A:.
  1803.  
  1804. Now if you have some application  that requires you to use the |nSUBST|n com-
  1805. mand  because that app doesn't understand  about subdirectories, then you
  1806. want to only run that app from a batch file  that makes the SUBSTitution,
  1807. runs the program,  and then cancels the SUBSTitution between the time you
  1808. exit the app  and the time you get your  DOS prompt back.   That way, you
  1809. don't have  to worry  about those commands  that |nSUBST|n is not  compatible
  1810. with,  because the only time |nSUBST|n will be active is while you're running
  1811. that application that needs it.   But if shelling out to DOS is something
  1812. that program allows,  then if you do so,  don't forget  to stay away from
  1813. those commands that |nSUBST|n doesn't like!
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.                      <page down> for The |nTREE|n Command
  1821.                              The |TTREE|T Command
  1822.  
  1823. This command  just shows you a sort of a list  of all the directories and
  1824. subdirectories you have on your disk.  Here's the syntax:
  1825.           |nTREE|n D:\DIR /F /A
  1826. where D:\DIR  is the drive and part of the directory tree  where you want
  1827. to start the listing.   Before version 4, you couldn't say the directory,
  1828. just the drive, for which you want the tree display.  In version 4 if you
  1829. don't specify  any |spath|sname,  it will start the display  with the current
  1830. directory instead of the root the way older versions did.   The /F switch
  1831. says you want  to see the names  of all the files  under each  directory.
  1832. And the /A switch, starting with version 4, lets you use a slightly diff-
  1833. erent character set  for the display,  in case your printer  doesn't like
  1834. the normal one.  That will make it use things like + and -- and || to draw
  1835. the lines with.   Of course,  to get the display to your printer, you use
  1836. output redirection, as in:
  1837.           |nTREE|n C:\ /F > PRN
  1838.  
  1839.  
  1840.                  For beginning of File 4, see CONFIG.SYS
  1841. |tAUTOEXEC.BAT|t|fSIMPLY1|f
  1842. |TFASTOPEN|T|fSIMPLY1|f
  1843. |TFAT|T|fSIMPLY1|f
  1844. |tUNFORMAT|t|fSIMPLY1|f
  1845. |tXCOPY|t|fSIMPLY1|f
  1846. |tBatch|t|fSIMPLY2|f
  1847. |tRedirection|t|fSIMPLY2|f
  1848. |TREM|T|fSIMPLY2|f
  1849. |tANSI.SYS|t|fSIMPLY4|f
  1850. |tbad sector|t|fSIMPLY4|f
  1851. |TBREAK|T|fSIMPLY4|f
  1852. |TBUFFERS|T|fSIMPLY4|f
  1853. |tCONFIG.SYS|t|fSIMPLY4|f
  1854. |tDevice Driver|t|fSIMPLY4|f
  1855. |TDEVIC|1E|T|fSIMPLY4|f
  1856. |tEnvironment|t|fSIMPLY4|f
  1857. |TFDISK|T|fSIMPLY4|f
  1858. |tfloppy|t|fSIMPLY4|f
  1859. |TFORMAT|T|fSIMPLY4|f
  1860. |TGRAPHICS|T|fSIMPLY4|f
  1861. |tIBMBIO.COM|t|fSIMPLY4|f
  1862. |tIBMDOS.COM|t|fSIMPLY4|f
  1863. |TINSTALL|T|fSIMPLY4|f
  1864. |tinterrupt|t|fSIMPLY4|f
  1865. |tIO.SYS|t|fSIMPLY4|f
  1866. |TJOIN|T|fSIMPLY4|f
  1867. |TLABEL|T|fSIMPLY4|f
  1868. |TLASTDRIVE|T|fSIMPLY4|f
  1869. |tLogical Drives|t|fSIMPLY4|f
  1870. |tmacros|t|fSIMPLY4|f
  1871. |TMIRROR|T|fSIMPLY4|f
  1872. |tMSDOS.SYS|t|fSIMPLY4|f
  1873. |tpartition|t|fSIMPLY4|f
  1874. |tPATH|t|fSIMPLY4|f
  1875. |tPROMPT|t|fSIMPLY4|f
  1876. |tvolume|t|fSIMPLY4|f
  1877. |TC|1:|T|fSIMPLY5|f
  1878. |TCHDIR|T|fSIMPLY5|f
  1879. |TCLOCK$|T|fSIMPLY5|f
  1880. |tCode Page|t|fSIMPLY5|f
  1881. |TCOM1|T|fSIMPLY5|f
  1882. |tCOMMAND.COM|t|fSIMPLY5|f
  1883. |TCOMMAN|1D|T|fSIMPLY5|f
  1884. |TCON|T|fSIMPLY5|f
  1885. |TCOPY|T|fSIMPLY5|f
  1886. |tcurrent|t|fSIMPLY5|f
  1887. |tdefault|t|fSIMPLY5|f
  1888. |TDEL|T|fSIMPLY5|f
  1889. |tDevice|1s|t|fSIMPLY5|f
  1890. |tDirectory|t|fSIMPLY5|f
  1891. |TDIR|T|fSIMPLY5|f
  1892. |TERASE|T|fSIMPLY5|f
  1893. |TEXIT|T|fSIMPLY5|f
  1894. |texternal|t|fSIMPLY5|f
  1895. |TLPT1|T|fSIMPLY5|f
  1896. |TNUL|T|fSIMPLY5|f
  1897. |TPRN|T|fSIMPLY5|f
  1898. |TRENAME|T|fSIMPLY5|f
  1899. |TRMDIR|T|fSIMPLY5|f
  1900. |troot|t|fSIMPLY5|f
  1901. |tShelling Out|t|fSIMPLY5|f
  1902. |TTIME|T|fSIMPLY5|f
  1903. |TTYPE|T|fSIMPLY5|f
  1904. |TVERIFY|T|fSIMPLY5|f
  1905. |TBBS|T|fSIMPLY6|f
  1906. |tbinary|t|fSIMPLY6|f
  1907. |tBoot|t|fSIMPLY6|f
  1908. |tBoo|1t Disk|t|fSIMPLY6|f
  1909. |tCleaning|t|fSIMPLY6|f
  1910. |tcluster|t|fSIMPLY6|f
  1911. |tcommercial|t|fSIMPLY6|f
  1912. |tDisks|t|fSIMPLY6|f
  1913. |tKeyboard|t|fSIMPLY6|f
  1914. |tParameters|t|fSIMPLY6|f
  1915. |tPower|t|fSIMPLY6|f
  1916. |tpublic domain|t|fSIMPLY6|f
  1917. |tReboot|t|fSIMPLY6|f
  1918. |tsector|t|fSIMPLY6|f
  1919. |tShareware|t|fSIMPLY6|f
  1920. |TSY|1S|T|fSIMPLY6|f
  1921. |tWildcards|t|fSIMPLY6|f
  1922. |TAPPEND|T|fSIMPLY7|f
  1923. |TASSIGN|T|fSIMPLY7|f
  1924. |tAttributes|t|fSIMPLY7|f
  1925. |TBACKUP|T|fSIMPLY7|f
  1926. |TCHKDSK|T|fSIMPLY7|f
  1927. |TDISKCOMP|T|fSIMPLY7|f
  1928. |TDISKCOPY|T|fSIMPLY7|f
  1929. |TDOSKEY|T|fSIMPLY7|f
  1930. |TDOSSHELL|T|fSIMPLY7|f
  1931. |tfragmented|t|fSIMPLY7|f
  1932. |tHidden|t|fSIMPLY7|f
  1933. |toptimizer|t|fSIMPLY7|f
  1934.